leadingbridge commited on
Commit
6794548
1 Parent(s): fbe916d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -51,16 +51,17 @@ def chatgpt_clone(input, history):
51
  # Gradio Output Model
52
  with gr.Blocks() as demo:
53
  gr.Markdown("Choose the Chinese NLP model you want to use from the tabs")
54
- with gr.Tab("Sentiment Analysis"):
55
- inputs = gr.Textbox(placeholder="Enter a Chinese positive or negative sentence here")
56
- outputs = gr.Textbox(label="Sentiment Analysis")
57
- proceed_button = gr.Button("proceed")
58
- proceed_button.click(fn=sentiment_analysis, inputs=inputs, outputs=outputs)
59
  with gr.Tab("OpenAI Chatbot"):
60
  chatbot = gr.Chatbot()
61
  message = gr.Textbox(placeholder=prompt)
62
  state = gr.State()
63
  submit = gr.Button("SEND")
64
  submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
 
 
 
 
 
 
65
 
66
  demo.launch(inline=False)
 
51
  # Gradio Output Model
52
  with gr.Blocks() as demo:
53
  gr.Markdown("Choose the Chinese NLP model you want to use from the tabs")
 
 
 
 
 
54
  with gr.Tab("OpenAI Chatbot"):
55
  chatbot = gr.Chatbot()
56
  message = gr.Textbox(placeholder=prompt)
57
  state = gr.State()
58
  submit = gr.Button("SEND")
59
  submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
60
+ with gr.Tab("Sentiment Analysis"):
61
+ inputs = gr.Textbox(placeholder="Enter a Chinese positive or negative sentence here")
62
+ outputs = gr.Textbox(label="Sentiment Analysis")
63
+ proceed_button = gr.Button("proceed")
64
+ proceed_button.click(fn=sentiment_analysis, inputs=inputs, outputs=outputs)
65
+
66
 
67
  demo.launch(inline=False)