measmonysuon commited on
Commit
7f08be6
·
verified ·
1 Parent(s): f6e4098

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- # Configuration
9
- GOOGLE_API_KEY = 'AIzaSyAYXUMnwmR4nUGDCs97FJJsafcQAPAAuzE'
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