Vera-ZWY commited on
Commit
d2f7cc0
·
verified ·
1 Parent(s): be6a0c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -45,9 +45,9 @@ def stream_chat_with_rag(
45
  question = message
46
  #answer = client.predict(question=question, api_name="/run_graph")
47
  answer = client.predict(
48
- query="Hello!!",
49
- context="Hello!!",
50
- election_year="2016 Election",
51
  api_name="/process_query"
52
  )
53
 
@@ -55,14 +55,14 @@ def stream_chat_with_rag(
55
  print("Raw answer from API:")
56
  print(answer)
57
 
58
- # Format the assistant's answer and the relevant documents separately
59
- formatted_answer = format_answer_string(answer)
60
 
61
- # Update the conversation history with the new message and answer
62
- history.append((message, formatted_answer))
63
 
64
  # Return the formatted answer
65
- return formatted_answer
66
 
67
 
68
  def format_answer_string(answer: str):
 
45
  question = message
46
  #answer = client.predict(question=question, api_name="/run_graph")
47
  answer = client.predict(
48
+ query= message,
49
+ context="",
50
+ election_year=client_name,
51
  api_name="/process_query"
52
  )
53
 
 
55
  print("Raw answer from API:")
56
  print(answer)
57
 
58
+ # # Format the assistant's answer and the relevant documents separately
59
+ # formatted_answer = format_answer_string(answer)
60
 
61
+ # # Update the conversation history with the new message and answer
62
+ # history.append((message, formatted_answer))
63
 
64
  # Return the formatted answer
65
+ return answer
66
 
67
 
68
  def format_answer_string(answer: str):