Spaces:
Runtime error
Runtime error
Dmitry Beresnev
commited on
Commit
·
c639c6c
1
Parent(s):
9a1cb80
fix bot
Browse files- Dockerfile +2 -1
- src/telegram_bot.py +2 -1
Dockerfile
CHANGED
|
@@ -49,4 +49,5 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
|
| 49 |
CMD curl --fail http://localhost:7860/ || exit 1
|
| 50 |
|
| 51 |
# Run the application
|
| 52 |
-
CMD ["python", "-m", "uvicorn", "src.telegram_bot:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
| 49 |
CMD curl --fail http://localhost:7860/ || exit 1
|
| 50 |
|
| 51 |
# Run the application
|
| 52 |
+
#CMD ["python", "-m", "uvicorn", "src.telegram_bot:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 53 |
+
CMD ["python", "-m", "src/telegram_bot.py"]
|
src/telegram_bot.py
CHANGED
|
@@ -171,4 +171,5 @@ if __name__ == "__main__":
|
|
| 171 |
logger.info(f"Webhook URL will be: https://{SPACE_ID}.hf.space/{BOT_TOKEN[:10]}...")
|
| 172 |
logger.info("After deployment, visit /set_webhook to configure the webhook")
|
| 173 |
|
| 174 |
-
uvicorn.run(app, host="
|
|
|
|
|
|
| 171 |
logger.info(f"Webhook URL will be: https://{SPACE_ID}.hf.space/{BOT_TOKEN[:10]}...")
|
| 172 |
logger.info("After deployment, visit /set_webhook to configure the webhook")
|
| 173 |
|
| 174 |
+
#uvicorn.run(app, host="127.0.0.1", port=PORT)
|
| 175 |
+
application.run_polling()
|