lunarflu HF Staff commited on
Commit
91c09af
·
1 Parent(s): 26b2045

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py CHANGED
@@ -193,3 +193,25 @@ async def continue_codellama(message):
193
 
194
  except Exception as e:
195
  print(f"continue_codellama Error: {e}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
 
194
  except Exception as e:
195
  print(f"continue_codellama Error: {e}")
196
+ #---------------------------------------------------------------------------------------------------------------------
197
+ def run_bot():
198
+ if not DISCORD_TOKEN:
199
+ print("DISCORD_TOKEN NOT SET")
200
+ event.set()
201
+ else:
202
+ bot.run(DISCORD_TOKEN)
203
+
204
+
205
+ threading.Thread(target=run_bot).start()
206
+
207
+ event.wait()
208
+
209
+ with gr.Blocks() as demo:
210
+ gr.Markdown(
211
+ """
212
+ # Discord bot of https://huggingface.co/spaces/facebook/MusicGen
213
+ https://discord.com/api/oauth2/authorize?client_id=1151888750662664222&permissions=309237696512&scope=bot
214
+ """
215
+ )
216
+
217
+ demo.launch()