Vera-ZWY commited on
Commit
c94c99c
·
verified ·
1 Parent(s): d0f8456

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,10 +8,10 @@ import os
8
  HF_TOKEN = os.getenv("HF_TOKEN") # Replace with your actual token if not using an environment variable
9
 
10
  # Initialize the Gradio Client for the specified API
11
- client = Client("on1onmangoes/cnianswer101724v4", hf_token=HF_TOKEN)
12
 
13
 
14
- client_name = ['primo','secondo','terzo','quarto4', 'quinto5', 'secondo6', 'sesto6', 'settimo7','ottavo8','nono9']
15
 
16
 
17
 
@@ -41,8 +41,8 @@ def stream_chat_with_rag(
41
  # Add the current user message
42
  conversation += f"User: {message}\nAssistant:"
43
 
44
- # Call the API with the user's message
45
- question = message
46
  #answer = client.predict(question=question, api_name="/run_graph")
47
  answer = client.predict(question=question,selected_document=client_name, api_name="/get_answer")
48
 
 
8
  HF_TOKEN = os.getenv("HF_TOKEN") # Replace with your actual token if not using an environment variable
9
 
10
  # Initialize the Gradio Client for the specified API
11
+ client = Client("mangoesai/Elections_Comparing_Agent", hf_token=HF_TOKEN)
12
 
13
 
14
+ client_name = ['2016 election','2024 election']
15
 
16
 
17
 
 
41
  # Add the current user message
42
  conversation += f"User: {message}\nAssistant:"
43
 
44
+ # Call the API with the user's process_query
45
+ question = process_query
46
  #answer = client.predict(question=question, api_name="/run_graph")
47
  answer = client.predict(question=question,selected_document=client_name, api_name="/get_answer")
48