Shreyas094 commited on
Commit
9e81a2f
1 Parent(s): 2558749

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -507,8 +507,8 @@ def respond(message, history, model, temperature, num_calls, use_web_search, sel
507
  # Process Excel documents
508
  if excel_docs:
509
  if model == "gemini-1.5-flash":
510
- response = get_response_from_gemini(message, excel_context, "excel", num_calls, temperature)
511
- yield response
512
  else:
513
  for response in get_response_from_excel(message, model, excel_context, num_calls, temperature):
514
  yield response
@@ -516,8 +516,8 @@ def respond(message, history, model, temperature, num_calls, use_web_search, sel
516
  # Process other documents (PDF, Word)
517
  if other_docs:
518
  if model == "gemini-1.5-flash":
519
- response = get_response_from_gemini(message, other_context, "pdf", num_calls, temperature)
520
- yield response
521
  elif model == "@cf/meta/llama-3.1-8b-instruct":
522
  for response in get_response_from_cloudflare(prompt="", context=other_context, query=message, num_calls=num_calls, temperature=temperature, search_type="document"):
523
  yield response
 
507
  # Process Excel documents
508
  if excel_docs:
509
  if model == "gemini-1.5-flash":
510
+ for chunk in get_response_from_gemini(message, excel_context, "excel", num_calls, temperature):
511
+ yield chunk
512
  else:
513
  for response in get_response_from_excel(message, model, excel_context, num_calls, temperature):
514
  yield response
 
516
  # Process other documents (PDF, Word)
517
  if other_docs:
518
  if model == "gemini-1.5-flash":
519
+ for chunk in get_response_from_gemini(message, other_context, "pdf", num_calls, temperature):
520
+ yield chunk
521
  elif model == "@cf/meta/llama-3.1-8b-instruct":
522
  for response in get_response_from_cloudflare(prompt="", context=other_context, query=message, num_calls=num_calls, temperature=temperature, search_type="document"):
523
  yield response