Spaces:
Paused
Paused
some updates
Browse files- gradio questions channel
- added some new members
- co-occuring keywords
app.py
CHANGED
|
@@ -14,33 +14,39 @@ SLACK_BOT_TOKEN = os.getenv('BOT_USER_OAUTH_TOKEN_HF')
|
|
| 14 |
SLACK_CHANNEL_ID = os.getenv('SLACK_CHANNEL_ID_HF')
|
| 15 |
# 1259415803879751700 = test forum
|
| 16 |
# 1019883044724822016 = ask for help
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
TRIGGERS = {
|
| 21 |
-
"discord bot": "<@U051DB2754M>", #
|
| 22 |
-
"text to speech": "<@U039C2GANMV>", # VB
|
| 23 |
-
"tts": "<@U039C2GANMV>", # VB
|
| 24 |
-
"asr": "<@U039C2GANMV>", # VB
|
| 25 |
-
"musicgen": "<@U039C2GANMV>", # VB
|
| 26 |
-
"whisper": "<@U039C2GANMV>", # VB
|
| 27 |
-
"speech recognition": "<@U039C2GANMV>", # VB
|
| 28 |
-
"bark": "<@U039C2GANMV>", # VB
|
| 29 |
-
"autotrain": "<@U01E3LEC2N7>", # abhishek
|
| 30 |
-
"auto train": "<@U01E3LEC2N7>", # abhishek
|
| 31 |
-
"competition": "<@U01E3LEC2N7>", # abhishek
|
| 32 |
-
"competitions": "<@U01E3LEC2N7>", # abhishek
|
| 33 |
-
"sentence-transformers": "<@U04E4DNPWG7>", # tom aarsen
|
| 34 |
-
"sentence_transformers": "<@U04E4DNPWG7>", # tom aarsen
|
| 35 |
-
"setfit": "<@U04E4DNPWG7>", # tom aarsen
|
| 36 |
-
"sentence transformers": "<@U04E4DNPWG7>", # tom aarsen
|
| 37 |
-
"argilla": "<@U076B8C7G3E>", # david berenstein
|
| 38 |
-
"distilabel": "<@U076B8C7G3E>", # david berenstein
|
| 39 |
-
"argilla": "<@U0766H30T7F>", # natalia elvira
|
| 40 |
-
"dataset": "<@U0766H30T7F>", # natalia elvira
|
| 41 |
-
"docs": "<@U02DATT4C5B>", # steven liu
|
| 42 |
-
"documentation": "<@U02DATT4C5B>", # steven liu
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
intents = discord.Intents.all()
|
|
@@ -90,7 +96,7 @@ async def on_message(message):
|
|
| 90 |
@bot.event
|
| 91 |
async def on_thread_create(thread):
|
| 92 |
# (discord) must be the child thread of the CORRECT forum channel(s) (not just any thread, or any forum channel)
|
| 93 |
-
if isinstance(thread.parent, discord.ForumChannel) and thread.parent.id
|
| 94 |
print("4")
|
| 95 |
discord_thread_id = thread.id
|
| 96 |
slack_thread_ts = post_to_slack_create_thread(
|
|
|
|
| 14 |
SLACK_CHANNEL_ID = os.getenv('SLACK_CHANNEL_ID_HF')
|
| 15 |
# 1259415803879751700 = test forum
|
| 16 |
# 1019883044724822016 = ask for help
|
| 17 |
+
ASK_FOR_HELP_CHANNEL_ID = 1019883044724822016
|
| 18 |
+
GRADIO_CHANNEL_ID = 1025174734427656283
|
| 19 |
|
| 20 |
|
| 21 |
TRIGGERS = {
|
| 22 |
+
("discord bot",): "<@U051DB2754M>", # adam
|
| 23 |
+
("text to speech",): "<@U039C2GANMV>", # VB
|
| 24 |
+
("tts",): "<@U039C2GANMV>", # VB
|
| 25 |
+
("asr",): "<@U039C2GANMV>", # VB
|
| 26 |
+
("musicgen",): "<@U039C2GANMV>", # VB
|
| 27 |
+
("whisper",): "<@U039C2GANMV>", # VB
|
| 28 |
+
("speech recognition",): "<@U039C2GANMV>", # VB
|
| 29 |
+
("bark",): "<@U039C2GANMV>", # VB
|
| 30 |
+
("autotrain",): "<@U01E3LEC2N7>", # abhishek
|
| 31 |
+
("auto train",): "<@U01E3LEC2N7>", # abhishek
|
| 32 |
+
("competition",): "<@U01E3LEC2N7>", # abhishek
|
| 33 |
+
("competitions",): "<@U01E3LEC2N7>", # abhishek
|
| 34 |
+
("sentence-transformers",): "<@U04E4DNPWG7>", # tom aarsen
|
| 35 |
+
("sentence_transformers",): "<@U04E4DNPWG7>", # tom aarsen
|
| 36 |
+
("setfit",): "<@U04E4DNPWG7>", # tom aarsen
|
| 37 |
+
("sentence transformers",): "<@U04E4DNPWG7>", # tom aarsen
|
| 38 |
+
("argilla",): "<@U076B8C7G3E>", # david berenstein
|
| 39 |
+
("distilabel",): "<@U076B8C7G3E>", # david berenstein
|
| 40 |
+
("argilla",): "<@U0766H30T7F>", # natalia elvira
|
| 41 |
+
("dataset",): "<@U0766H30T7F>", # natalia elvira
|
| 42 |
+
("docs",): "<@U02DATT4C5B>", # steven liu
|
| 43 |
+
("documentation",): "<@U02DATT4C5B>", # steven liu
|
| 44 |
+
("gradio",): "<@U02NMK75F1V>", # abubakar abid
|
| 45 |
+
("argilla",): "<@U076MF65WEM>", # sara han diaz lorenzo
|
| 46 |
+
("distilabel",): "<@U076MF65WEM>", # sara han diaz lorenzo
|
| 47 |
+
("argilla",): "<@U0765RENPNZ>", # sara han diaz lorenzo
|
| 48 |
+
("distilabel",): "<@U0765RENPNZ>", # sara han diaz lorenzo
|
| 49 |
+
("dataset", "feedback"): "<@U0768RCHCRY>", # ben burtenshaw
|
| 50 |
}
|
| 51 |
|
| 52 |
intents = discord.Intents.all()
|
|
|
|
| 96 |
@bot.event
|
| 97 |
async def on_thread_create(thread):
|
| 98 |
# (discord) must be the child thread of the CORRECT forum channel(s) (not just any thread, or any forum channel)
|
| 99 |
+
if isinstance(thread.parent, discord.ForumChannel) and thread.parent.id in {ASK_FOR_HELP_CHANNEL_ID, GRADIO_CHANNEL_ID}:
|
| 100 |
print("4")
|
| 101 |
discord_thread_id = thread.id
|
| 102 |
slack_thread_ts = post_to_slack_create_thread(
|