on1onmangoes commited on
Commit
c7e5683
·
verified ·
1 Parent(s): b40b15f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -11,6 +11,10 @@ client = Client("on1onmangoes/CNIHUB101324v10", hf_token=HF_TOKEN)
11
  # Update the conversation history within the function.
12
  # Return the updated history along with any other required outputs.
13
 
 
 
 
 
14
  def stream_chat_with_rag(
15
  message: str,
16
  history: list,
@@ -224,7 +228,7 @@ with gr.Blocks(css=CSS) as demo:
224
 
225
  with gr.Tab("Process PDF"):
226
  pdf_input = gr.File(label="Upload PDF File")
227
- select_client_dropdown = gr.Dropdown(['rosariarossi', 'bianchifiordaliso', 'lorenzoverdi'], value="rosariarossi", label="Select Client")
228
  pdf_output = gr.Textbox(label="PDF Result", interactive=False)
229
 
230
  pdf_button = gr.Button("Process PDF")
@@ -234,17 +238,6 @@ with gr.Blocks(css=CSS) as demo:
234
  outputs=pdf_output
235
  )
236
 
237
- # with gr.Tab("Search"):
238
- # query_input = gr.Textbox(label="Enter Search Query")
239
- # search_output = gr.Textbox(label="Search Confidence Result", interactive=False)
240
-
241
- # search_button = gr.Button("Search")
242
- # search_button.click(
243
- # search_api,
244
- # inputs=query_input,
245
- # outputs=search_output
246
- # )
247
-
248
  with gr.Tab("Answer with RAG"):
249
  question_input = gr.Textbox(label="Enter Question for RAG")
250
  rag_output = gr.Textbox(label="RAG Answer Result", interactive=False)
 
11
  # Update the conversation history within the function.
12
  # Return the updated history along with any other required outputs.
13
 
14
+ client_name = ['rosariarossi','bianchifiordaliso','lorenzoverdi', 'quarto4', 'quinto5', 'secondo6', 'sesto6', 'settimo7','ottavo8','nono9']
15
+
16
+
17
+
18
  def stream_chat_with_rag(
19
  message: str,
20
  history: list,
 
228
 
229
  with gr.Tab("Process PDF"):
230
  pdf_input = gr.File(label="Upload PDF File")
231
+ select_client_dropdown = gr.Dropdown(client_name, value="rosariarossi", label="Select Client")
232
  pdf_output = gr.Textbox(label="PDF Result", interactive=False)
233
 
234
  pdf_button = gr.Button("Process PDF")
 
238
  outputs=pdf_output
239
  )
240
 
 
 
 
 
 
 
 
 
 
 
 
241
  with gr.Tab("Answer with RAG"):
242
  question_input = gr.Textbox(label="Enter Question for RAG")
243
  rag_output = gr.Textbox(label="RAG Answer Result", interactive=False)