NaimaAqeel commited on
Commit
0385c04
·
verified ·
1 Parent(s): f2ca711

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -60,7 +60,6 @@ def extract_text_from_docx(docx_path):
60
  text = "\n".join([para.text for para in doc.paragraphs])
61
  return text
62
 
63
-
64
  def process_and_query(state, text, file=None):
65
  # Initialize state on first run
66
  if state is None:
@@ -90,6 +89,11 @@ def process_and_query(state, text, file=None):
90
 
91
  # Update conversation history
92
  state["conversation"].append({"question": text,
 
 
 
 
 
93
 
94
 
95
 
 
60
  text = "\n".join([para.text for para in doc.paragraphs])
61
  return text
62
 
 
63
  def process_and_query(state, text, file=None):
64
  # Initialize state on first run
65
  if state is None:
 
89
 
90
  # Update conversation history
91
  state["conversation"].append({"question": text,
92
+ "answer": answer})
93
+
94
+ # Return the conversation history and potentially answer
95
+ return {"conversation": state["conversation"]}
96
+
97
 
98
 
99