bubuuunel commited on
Commit
248bd9e
·
verified ·
1 Parent(s): 94d1c8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -136,7 +136,7 @@ def predict(user_input,company):
136
  ))
137
  f.write("\n")
138
 
139
- return prediction [0]
140
 
141
  # Set-up the Gradio UI
142
  user_input = gr.Textbox (label = 'Query')
@@ -145,7 +145,7 @@ company = gr.Radio(
145
  label = 'company'
146
  )
147
 
148
- model_output = gr.Textbox (label = 'Response')
149
 
150
  # Add text box and radio button to the interface
151
  # The radio button is used to select the company 10k report in which the context needs to be retrieved.
@@ -158,7 +158,7 @@ model_output = gr.Textbox (label = 'Response')
158
  demo = gr.Interface(
159
  fn=predict,
160
  inputs=[user_input,company],
161
- outputs=[model_output],
162
  title="RAG on 10k-reports",
163
  description="This API allows you to query on annaul reports",
164
  concurrency_limit=16
 
136
  ))
137
  f.write("\n")
138
 
139
+ return prediction
140
 
141
  # Set-up the Gradio UI
142
  user_input = gr.Textbox (label = 'Query')
 
145
  label = 'company'
146
  )
147
 
148
+
149
 
150
  # Add text box and radio button to the interface
151
  # The radio button is used to select the company 10k report in which the context needs to be retrieved.
 
158
  demo = gr.Interface(
159
  fn=predict,
160
  inputs=[user_input,company],
161
+ outputs="text",
162
  title="RAG on 10k-reports",
163
  description="This API allows you to query on annaul reports",
164
  concurrency_limit=16