Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import telebot
|
|
2 |
import requests
|
3 |
from telebot import apihelper
|
4 |
import subprocess
|
5 |
-
|
6 |
|
7 |
# Set up the proxy
|
8 |
apihelper.proxy = {'https': 'socks5h://127.0.0.1:7860'}
|
@@ -12,7 +12,7 @@ with open('cokk.txt', 'r', encoding='utf-8') as file:
|
|
12 |
info = file.read()
|
13 |
|
14 |
# Replace 'YOUR_TOKEN' with your actual bot token
|
15 |
-
bot = telebot.TeleBot('
|
16 |
|
17 |
def get_assistant_response(user_input):
|
18 |
payload = {
|
@@ -71,4 +71,9 @@ def echo_all(message):
|
|
71 |
bot.reply_to(message, response_text)
|
72 |
print(conversation_history)
|
73 |
|
|
|
|
|
|
|
|
|
|
|
74 |
bot.polling()
|
|
|
2 |
import requests
|
3 |
from telebot import apihelper
|
4 |
import subprocess
|
5 |
+
import gradio as gr
|
6 |
|
7 |
# Set up the proxy
|
8 |
apihelper.proxy = {'https': 'socks5h://127.0.0.1:7860'}
|
|
|
12 |
info = file.read()
|
13 |
|
14 |
# Replace 'YOUR_TOKEN' with your actual bot token
|
15 |
+
bot = telebot.TeleBot('YOUR_TOKEN')
|
16 |
|
17 |
def get_assistant_response(user_input):
|
18 |
payload = {
|
|
|
71 |
bot.reply_to(message, response_text)
|
72 |
print(conversation_history)
|
73 |
|
74 |
+
def greet():
|
75 |
+
return "Hello Welcome To OMAR BOT'S CREATOR"
|
76 |
+
|
77 |
+
iface = gr.Interface(fn=greet, inputs=None, outputs=None)
|
78 |
+
iface.launch()
|
79 |
bot.polling()
|