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