Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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("
|
12 |
|
13 |
|
14 |
-
client_name = ['
|
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
|
45 |
-
question =
|
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 |
|