Spaces:
Running
Running
UPDATE
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import secrets
|
|
3 |
import gradio as gr
|
4 |
from AudioFusion import Fusion
|
5 |
|
6 |
-
from telethon.sync import TelegramClient, events
|
7 |
|
8 |
API_ID = os.environ.get("API_ID")
|
9 |
API_HASH = os.environ.get("API_HASH")
|
@@ -131,7 +131,6 @@ with gr.Blocks(title="Audio Fusion") as iface:
|
|
131 |
btnClear.add(components=output)
|
132 |
btnRun.click(fn=process_audio, inputs=inputs, outputs=output, api_name="AudioFusion")
|
133 |
|
134 |
-
iface.launch(share=False)
|
135 |
|
136 |
|
137 |
client = TelegramClient('session_name', API_ID, API_HASH)
|
@@ -146,7 +145,12 @@ async def broadcast_handler(event):
|
|
146 |
await event.respond(message_to_broadcast)
|
147 |
|
148 |
|
|
|
|
|
|
|
149 |
if __name__ == '__main__':
|
150 |
client.start(bot_token=BOT_TOKEN)
|
|
|
151 |
print("Bot started succefully!")
|
152 |
-
client.run_until_disconnected()
|
|
|
|
3 |
import gradio as gr
|
4 |
from AudioFusion import Fusion
|
5 |
|
6 |
+
from telethon.sync import TelegramClient, events, Button
|
7 |
|
8 |
API_ID = os.environ.get("API_ID")
|
9 |
API_HASH = os.environ.get("API_HASH")
|
|
|
131 |
btnClear.add(components=output)
|
132 |
btnRun.click(fn=process_audio, inputs=inputs, outputs=output, api_name="AudioFusion")
|
133 |
|
|
|
134 |
|
135 |
|
136 |
client = TelegramClient('session_name', API_ID, API_HASH)
|
|
|
145 |
await event.respond(message_to_broadcast)
|
146 |
|
147 |
|
148 |
+
async def initiation():
|
149 |
+
await client.send_message(, "**Hugging is Running.**", buttons=[(Button.url("Execal", "https://t.me/execal"),)],)
|
150 |
+
|
151 |
if __name__ == '__main__':
|
152 |
client.start(bot_token=BOT_TOKEN)
|
153 |
+
client.loop.run_until_complete(initiation())
|
154 |
print("Bot started succefully!")
|
155 |
+
client.run_until_disconnected()
|
156 |
+
iface.launch(share=False)
|