Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,18 +58,23 @@ def reply(input):
|
|
58 |
)["choices"][0]["text"].strip(" \n")
|
59 |
|
60 |
|
61 |
-
input_text = gr.inputs.Textbox(label="Enter your
|
62 |
text_output = gr.outputs.Textbox(label="Answer")
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
ui = gr.Interface(fn=reply,
|
65 |
inputs=input_text,
|
66 |
outputs=[text_output],
|
67 |
-
|
|
|
|
|
68 |
layout="vertical",
|
69 |
inputs_layout="stacked",
|
70 |
outputs_layout="stacked",
|
71 |
allow_flagging=False)
|
72 |
|
73 |
-
|
74 |
-
|
75 |
ui.launch()
|
|
|
58 |
)["choices"][0]["text"].strip(" \n")
|
59 |
|
60 |
|
61 |
+
input_text = gr.inputs.Textbox(label="Enter your questions here")
|
62 |
text_output = gr.outputs.Textbox(label="Answer")
|
63 |
|
64 |
+
input_text = gr.inputs.Textbox(label="Enter your questions here", placeholder="E.g. What is DNA?")
|
65 |
+
text_output = gr.outputs.Textbox(label="Answer")
|
66 |
+
|
67 |
+
description = "Scholar Bot is a question answering system designed to provide accurate and relevant answers to questions in the field of biology. Simply enter your question in the text box above and Scholar Bot will use advanced natural language processing algorithms to search a large corpus of biology text to find the best answer for you. Scholar Bot uses the Sentence Transformers model to generate embeddings of text, and OpenAI's GPT-3 language model to provide answers to your questions."
|
68 |
+
|
69 |
ui = gr.Interface(fn=reply,
|
70 |
inputs=input_text,
|
71 |
outputs=[text_output],
|
72 |
+
title="Scholar Bot",
|
73 |
+
description=description,
|
74 |
+
theme="light",
|
75 |
layout="vertical",
|
76 |
inputs_layout="stacked",
|
77 |
outputs_layout="stacked",
|
78 |
allow_flagging=False)
|
79 |
|
|
|
|
|
80 |
ui.launch()
|