Nicolás Larenas commited on
Create app.py
Browse filesThis is the main entry point that runs both the Discord bot and the Gradio chatbot.
app.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import asyncio
|
| 2 |
+
from discord_bot import run_discord_bot
|
| 3 |
+
from gradio_interface import run_gradio_interface
|
| 4 |
+
|
| 5 |
+
if __name__ == "__main__":
|
| 6 |
+
# Launch both Discord bot and Gradio interface
|
| 7 |
+
loop = asyncio.get_event_loop()
|
| 8 |
+
loop.create_task(run_discord_bot()) # Start the Discord bot
|
| 9 |
+
run_gradio_interface() # Launch Gradio interface
|