Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,6 @@ if not HF_HUB_TOKEN:
|
|
22 |
login(token=HF_HUB_TOKEN)
|
23 |
|
24 |
|
25 |
-
|
26 |
# Load Hebrew text generation model
|
27 |
hebrew_generator = pipeline("text-generation", model="Norod78/hebrew-gpt_neo-small")
|
28 |
|
@@ -61,6 +60,12 @@ def generate_response(text):
|
|
61 |
app = FastAPI()
|
62 |
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
# Initialize Telegram Bot
|
65 |
telegram_app = Application.builder().token(TOKEN).build()
|
66 |
|
@@ -96,6 +101,7 @@ telegram_app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_
|
|
96 |
# await init_telegram()
|
97 |
|
98 |
|
|
|
99 |
# API Route to receive updates from Telegram
|
100 |
@app.post("/")
|
101 |
async def receive_update(request: Request):
|
|
|
22 |
login(token=HF_HUB_TOKEN)
|
23 |
|
24 |
|
|
|
25 |
# Load Hebrew text generation model
|
26 |
hebrew_generator = pipeline("text-generation", model="Norod78/hebrew-gpt_neo-small")
|
27 |
|
|
|
60 |
app = FastAPI()
|
61 |
|
62 |
|
63 |
+
# Health check endpoint
|
64 |
+
@app.get("/")
|
65 |
+
async def root():
|
66 |
+
return {"message": "Decision Helper Bot is running!"}
|
67 |
+
|
68 |
+
|
69 |
# Initialize Telegram Bot
|
70 |
telegram_app = Application.builder().token(TOKEN).build()
|
71 |
|
|
|
101 |
# await init_telegram()
|
102 |
|
103 |
|
104 |
+
|
105 |
# API Route to receive updates from Telegram
|
106 |
@app.post("/")
|
107 |
async def receive_update(request: Request):
|