GPT / app.py
sparkmy
Create app.py
0f09cc4
raw
history blame
No virus
1.02 kB
import gradio as gr
def predict(inp):
return [[inp,inp]]
def reset_textbox():
return gr.update(value='')
with gr.Blocks( title='GPT-3.5-turbo by sparkmy') as demo:
chatbot = gr.Chatbot(label="bot").style(height=380)
txt = gr.Textbox(label='123',placeholder='input')
txt.style(container=False)
with gr.Row():
with gr.Column(scale=8):
submit = gr.Button('send', variant='primary').style(full_width=True)
with gr.Column(scale=2):
Hightlightedtext = gr.HighlightedText(show_label=False,value=[("Text","Label 1"),("to be","Label 2"),("highlighted","Label 3")])
submit.click(predict, inputs=txt, outputs=[chatbot])
submit.click(reset_textbox, [], [txt])
tab = gr.Tab("Please don't share with too many people, otherwise it will broken down!.And if you want to use it for a long time, please contract with me, my email: sparkmy181@163.com")
demo.queue(max_size=10)
demo.launch(share=False,show_tips=True,show_error=True,debug=True,auth=None)