awacke1's picture
Update app.py
47bc299
raw
history blame
690 Bytes
import gradio as gr
import menti_bot
def update(name):
return f"Welcome to Gradio, {name}!"
mentid = input("Menti ID: ")
menti = menti_bot.Menti(mentid)
am = int(input("Amount of Bots (1 Thread per bot): "))
bots = [menti_bot.MentiClient(menti) for i in range(am)]
bot = menti_bot.MentiBot(menti, bots)
bot.identify()
bot.loop()
demo = gr.Blocks()
with demo:
gr.Markdown(
"""
# Hello World!
Start typing below to see the output.
""")
inp = gr.Textbox(placeholder="What is your name?")
out = gr.Textbox()
inp.change(fn=update,
inputs=inp,
outputs=out)
demo.launch()