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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,7 @@ HF_TOKEN = os.getenv("HF_TOKEN") # Replace with your actual token if not using
11
  client = Client("mangoesai/Elections_Comparing_Agent", hf_token=HF_TOKEN)
12
 
13
 
14
- client_name = ['2016 election','2024 election']
15
 
16
 
17
 
@@ -42,9 +42,9 @@ def stream_chat_with_rag(
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
 
49
  # Debugging: Print the raw response
50
  print("Raw answer from API:")
 
11
  client = Client("mangoesai/Elections_Comparing_Agent", hf_token=HF_TOKEN)
12
 
13
 
14
+ client_name = ['2016 Election','2024 Election']
15
 
16
 
17
 
 
42
  conversation += f"User: {message}\nAssistant:"
43
 
44
  # Call the API with the user's process_query
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="/process_query")
48
 
49
  # Debugging: Print the raw response
50
  print("Raw answer from API:")