File size: 361 Bytes
4717db6
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import os
import gradio as gr

def start_app(telegram_token: str, ngrok_token: str):
    cmnd = f"bash run_with_ngrok.sh {telegram_token} {ngrok_token}"
    os.system(cmnd)
    return 'Application started'

demo = gr.Interface(
    start_app, 
    [gr.Textbox(label="Telegram Token"),gr.Textbox(label="NGROK Token")],
    [gr.Textbox(label="Result")]
).launch()