Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,13 +3,16 @@ import google.generativeai as genai
|
|
| 3 |
import logging
|
| 4 |
import requests
|
| 5 |
import gradio as gr
|
|
|
|
|
|
|
| 6 |
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
BOT_TOKEN = '7484321656:AAFaswxTqaSHu_s4jd_pk2Q2OJJWYcWHwAM'
|
| 11 |
WEBHOOK_URL = f"https://measmonysuon-flyingbird.hf.space/webhooks/handle_update"
|
| 12 |
|
|
|
|
| 13 |
# Initialize the Telegram bot
|
| 14 |
bot = telebot.TeleBot(BOT_TOKEN)
|
| 15 |
|
|
|
|
| 3 |
import logging
|
| 4 |
import requests
|
| 5 |
import gradio as gr
|
| 6 |
+
from dotenv import load_dotenv
|
| 7 |
+
import os
|
| 8 |
|
| 9 |
+
load_dotenv() # Load environment variables from .env file
|
| 10 |
|
| 11 |
+
GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY')
|
| 12 |
+
BOT_TOKEN = os.getenv('BOT_TOKEN')
|
|
|
|
| 13 |
WEBHOOK_URL = f"https://measmonysuon-flyingbird.hf.space/webhooks/handle_update"
|
| 14 |
|
| 15 |
+
|
| 16 |
# Initialize the Telegram bot
|
| 17 |
bot = telebot.TeleBot(BOT_TOKEN)
|
| 18 |
|