Brasd99 commited on
Commit
5475510
·
1 Parent(s): 76c067f

Added examples

Browse files
Files changed (1) hide show
  1. app.py +10 -4
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 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()
 
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()