Spaces:
Sleeping
Sleeping
Update pipeline.py
Browse files- pipeline.py +3 -0
pipeline.py
CHANGED
|
@@ -204,6 +204,9 @@ def run_pipeline(query: str) -> str:
|
|
| 204 |
|
| 205 |
refusal_text = refusal_chain.run({"topic": "this topic"})
|
| 206 |
return tailor_chain.run({"response": refusal_text}).strip()
|
|
|
|
|
|
|
|
|
|
| 207 |
|
| 208 |
# Initialize chains and vectorstores
|
| 209 |
classification_chain = get_classification_chain()
|
|
|
|
| 204 |
|
| 205 |
refusal_text = refusal_chain.run({"topic": "this topic"})
|
| 206 |
return tailor_chain.run({"response": refusal_text}).strip()
|
| 207 |
+
except Exception as e:
|
| 208 |
+
raise RuntimeError(f"Error in run_runpipeline: {str(e)}")
|
| 209 |
+
|
| 210 |
|
| 211 |
# Initialize chains and vectorstores
|
| 212 |
classification_chain = get_classification_chain()
|