MRP999 commited on
Commit
f0236dd
·
verified ·
1 Parent(s): e047b31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -149,7 +149,7 @@ async def answer_batch_questions(request: Request, body: QueryRequest):
149
  except Exception as e:
150
  raise HTTPException(status_code=500, detail=f"PDF processing error: {str(e)}")
151
 
152
- # retriever = ClauseQueryEngine(model_name=embedding_model)
153
  # client = InferenceClient(
154
  # provider=hf_provider,
155
  # api_key=os.environ["HF_TOKEN"],
@@ -157,7 +157,7 @@ async def answer_batch_questions(request: Request, body: QueryRequest):
157
 
158
  # system="You are a helpful assistant answering questions from contracts and policies."
159
  answers = []
160
- # for question in body.questions:
161
  matched_clauses = retriever.search(question, top_k=5)
162
 
163
  prompt = build_prompt(question, matched_clauses)
 
149
  except Exception as e:
150
  raise HTTPException(status_code=500, detail=f"PDF processing error: {str(e)}")
151
 
152
+ retriever = ClauseQueryEngine(model_name=embedding_model)
153
  # client = InferenceClient(
154
  # provider=hf_provider,
155
  # api_key=os.environ["HF_TOKEN"],
 
157
 
158
  # system="You are a helpful assistant answering questions from contracts and policies."
159
  answers = []
160
+ for question in body.questions:
161
  matched_clauses = retriever.search(question, top_k=5)
162
 
163
  prompt = build_prompt(question, matched_clauses)