File size: 465 Bytes
e8fb838
1ffd977
 
e8fb838
 
1ffd977
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import torch
import gradio as gr

from gen import get_pretrained_models, get_output, setup_model_parallel

def chat(user_input):
    bot_response = "hello world"
    response = ""
    for word in bot_response.split(" "):
        response = response + " " + word
        yield response

with gr.Blocks() as demo:
    chatbot = gr.Chatbot()
    textbox = gr.Textbox("Hello, how are you doing today?")

    textbox.submit(chat, textbox, chatbot)

demo.queue().launch()