AnishHF commited on
Commit
830bd55
β€’
1 Parent(s): 0c345ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -9
app.py CHANGED
@@ -302,17 +302,22 @@ with gr.Blocks(css=css) as interface:
302
  gr.Markdown(welcome_message) # Display the welcome message
303
 
304
  # Input and output elements
305
- with gr.Row():
306
- with gr.Column():
307
- text_prompt = gr.Textbox(label="Input Prompt", placeholder="Example: What are the symptoms of COVID-19?", lines=2)
308
- generate_button = gr.Button("Ask Me", variant="primary")
309
-
310
- with gr.Row():
311
- answer_output = gr.Textbox(type="text", label="Answer")
312
-
 
 
 
 
313
  # Assuming you have a function `chat` that processes the prompt and returns a response
314
  generate_button.click(chat_v1, inputs=[text_prompt], outputs=answer_output)
315
 
316
  # Launch the app
317
  #interface.launch(inline=True, share=False) #For the notebook
318
- interface.launch(server_name="0.0.0.0",server_port=7860)
 
 
302
  gr.Markdown(welcome_message) # Display the welcome message
303
 
304
  # Input and output elements
305
+ #with gr.Row():
306
+ # with gr.Column():
307
+ # text_prompt = gr.Textbox(label="Input Prompt", placeholder="Example: What are the symptoms of COVID-19?", lines=2)
308
+ # generate_button = gr.Button("Ask Me", variant="primary")
309
+
310
+ #with gr.Row():
311
+ # answer_output = gr.Textbox(type="text", label="Answer")
312
+
313
+ gr.ChatInterface(
314
+ chat_v1,
315
+ additional_inputs=additional_inputs,
316
+ )
317
  # Assuming you have a function `chat` that processes the prompt and returns a response
318
  generate_button.click(chat_v1, inputs=[text_prompt], outputs=answer_output)
319
 
320
  # Launch the app
321
  #interface.launch(inline=True, share=False) #For the notebook
322
+ #interface.launch(server_name="0.0.0.0",server_port=7860)
323
+ demo.queue().launch(debug=True)