Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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 =
|
46 |
#answer = client.predict(question=question, api_name="/run_graph")
|
47 |
-
answer = client.predict(question=question,selected_document=client_name, api_name="/
|
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:")
|