bstraehle commited on
Commit
275b9ce
·
1 Parent(s): 394bc19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -77,9 +77,8 @@ def invoke(openai_api_key, use_rag, prompt):
77
  return_source_documents = True)
78
  result = rag_chain({"query": prompt})
79
  result = result["result"]
80
- except:
81
- raise gr.Error("Testing")
82
- #result = "Testing"
83
  else:
84
  chain = LLMChain(llm = llm, prompt = LLM_CHAIN_PROMPT)
85
  result = chain.run({"question": prompt})
 
77
  return_source_documents = True)
78
  result = rag_chain({"query": prompt})
79
  result = result["result"]
80
+ except Error as e:
81
+ raise gr.Error(e)
 
82
  else:
83
  chain = LLMChain(llm = llm, prompt = LLM_CHAIN_PROMPT)
84
  result = chain.run({"question": prompt})