Spaces:
Running
on
T4
Running
on
T4
Julien Simon
commited on
Commit
·
0d6c6e0
1
Parent(s):
35c5fe6
Update components
Browse files
app.py
CHANGED
@@ -82,14 +82,14 @@ def process(input_selection, query, filepath, hits):
|
|
82 |
return text, find_sentences(text, hits)
|
83 |
|
84 |
# Gradio inputs
|
85 |
-
buttons = gr.
|
86 |
-
text_query = gr.
|
87 |
-
mic = gr.
|
88 |
-
slider = gr.
|
89 |
|
90 |
# Gradio outputs
|
91 |
-
speech_query = gr.
|
92 |
-
results = gr.
|
93 |
type='pandas',
|
94 |
headers=['Ticker', 'Form type', 'Filing date', 'Text', 'Score'],
|
95 |
label='Query results')
|
|
|
82 |
return text, find_sentences(text, hits)
|
83 |
|
84 |
# Gradio inputs
|
85 |
+
buttons = gr.Radio(['text','speech'], type='value', default='speech', label='Input selection')
|
86 |
+
text_query = gr.Textbox(lines=1, label='Text input', default='The company is under investigation by tax authorities for potential fraud.')
|
87 |
+
mic = gr.Audio(source='microphone', type='filepath', label='Speech input', optional=True)
|
88 |
+
slider = gr.Slider(minimum=1, maximum=10, step=1, default=3, label='Number of hits')
|
89 |
|
90 |
# Gradio outputs
|
91 |
+
speech_query = gr.Textbox(type='text', label='Query string')
|
92 |
+
results = gr.Dataframe(
|
93 |
type='pandas',
|
94 |
headers=['Ticker', 'Form type', 'Filing date', 'Text', 'Score'],
|
95 |
label='Query results')
|