Spaces:
Runtime error
Runtime error
Added examples
Browse files
app.py
CHANGED
|
@@ -84,14 +84,20 @@ def find_answers(tags: str, questions: str) -> str:
|
|
| 84 |
|
| 85 |
title = '<h1 style="text-align:center">AnswerMate</h1>'
|
| 86 |
|
| 87 |
-
with gr.Blocks(theme='soft', title='AnswerMate') as
|
| 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(
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
|
|
|
| 84 |
|
| 85 |
title = '<h1 style="text-align:center">AnswerMate</h1>'
|
| 86 |
|
| 87 |
+
with gr.Blocks(theme='soft', title='AnswerMate') as blocks:
|
| 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(
|
| 92 |
+
label='Enter tags (each line is a separate tag). Maximum: 5.',
|
| 93 |
+
placeholder='.Net\nC#',
|
| 94 |
+
lines=5)
|
| 95 |
+
questions_input = gr.Textbox(
|
| 96 |
+
label='Enter questions (each line is a separate question). Maximum 25.',
|
| 97 |
+
placeholder='What is inheritance, encapsulation, abstraction, polymorphism?\nWhat is CLR?',
|
| 98 |
+
lines=25)
|
| 99 |
process_button = gr.Button('Find answers')
|
| 100 |
outputs = gr.Textbox(label='Output', placeholder='Output will appear here')
|
| 101 |
process_button.click(fn=find_answers, inputs=[tags_input, questions_input], outputs=outputs)
|
| 102 |
|
| 103 |
+
blocks.launch()
|