Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,10 +48,11 @@ async def chat(request: Request):
|
|
48 |
if ask == 'clear':
|
49 |
os.system("cls")
|
50 |
|
51 |
-
return generate_chunks()
|
52 |
|
53 |
except Exception as e:
|
54 |
-
|
|
|
55 |
|
56 |
if __name__ == "__main__":
|
57 |
import uvicorn
|
|
|
48 |
if ask == 'clear':
|
49 |
os.system("cls")
|
50 |
|
51 |
+
return {"chunks": generate_chunks()}
|
52 |
|
53 |
except Exception as e:
|
54 |
+
print(f"Exception: {e}")
|
55 |
+
raise HTTPException(status_code=500, detail="Internal Server Error")
|
56 |
|
57 |
if __name__ == "__main__":
|
58 |
import uvicorn
|