Spaces:
Runtime error
Runtime error
Beautified UI
Browse files
app.py
CHANGED
@@ -82,24 +82,16 @@ def find_answers(tags: str, questions: str) -> str:
|
|
82 |
|
83 |
return format_results(results)
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
theme='soft',
|
99 |
-
title=title,
|
100 |
-
description=description,
|
101 |
-
fn=find_answers,
|
102 |
-
inputs=inputs,
|
103 |
-
outputs=outputs)
|
104 |
-
|
105 |
-
gradio_interface.launch()
|
|
|
82 |
|
83 |
return format_results(results)
|
84 |
|
85 |
+
title = '<h1 style="text-align:center">AnswerMate</h1>'
|
86 |
+
|
87 |
+
with gr.Blocks(theme='soft', title='AnswerMate') as demo:
|
88 |
+
gr.HTML(title)
|
89 |
+
gr.Markdown('The service allows you to get answers to all questions on the specified topic.')
|
90 |
+
with gr.Row():
|
91 |
+
tags_input = gr.Textbox(label='Enter tags (each line is a separate tag). Maximum: 5.', lines=5)
|
92 |
+
questions_input = gr.Textbox(label='Enter questions (each line is a separate question). Maximum 25.', lines=25)
|
93 |
+
process_button = gr.Button('Find answers')
|
94 |
+
outputs = gr.Textbox(label='Output', placeholder='Output will appear here')
|
95 |
+
process_button.click(fn=find_answers, inputs=[tags_input, questions_input], outputs=outputs)
|
96 |
+
|
97 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|