Spaces:
Sleeping
Sleeping
#build theme | |
import gradio as gr | |
def chat1(message,history): | |
history = history or [] | |
message = message.lower() | |
if message.startswith("how many"): | |
response = ("1 to 10") | |
else: | |
response = ("whatever man") | |
history.append((message, response)) | |
return history, history | |
chatbot = gr.Chatbot() | |
chatbot1 = gr.Chatbot() | |
chatbot2 = gr.Chatbot() | |
with gr.Blocks() as demo: | |
gr.Markdown("Efficient Fine Tuning - Bert Model for Text Classification") | |
with gr.Row(): | |
with gr.Column(): | |
inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") | |
btn = gr.Button("Run") | |
with gr.Row(): | |
with gr.Column(): | |
out = gr.Textbox() | |
with gr.Column(): | |
out1 = gr.Textbox() | |
with gr.Column(): | |
out2 = gr.Textbox() | |
btn.click(fn=chat1, inputs=inp, outputs=out) | |
btn.click(fn=chat1, inputs=inp, outputs=out1) | |
btn.click(fn=chat1, inputs=inp, outputs=out2) | |
if __name__ == "__main__": | |
demo.launch() | |