Spaces:
Running
Running
Ilyas KHIAT
commited on
Commit
·
8135e56
1
Parent(s):
fc093fb
whatif
Browse files
main.py
CHANGED
@@ -135,9 +135,12 @@ async def generate(user_input: UserInput):
|
|
135 |
|
136 |
|
137 |
@app.post("/whatif")
|
138 |
-
async def
|
139 |
try:
|
140 |
-
|
|
|
|
|
|
|
141 |
|
142 |
@app.post("/whatif_chat")
|
143 |
async def generate_whatif_chat(user_input: UserInput):
|
|
|
135 |
|
136 |
|
137 |
@app.post("/whatif")
|
138 |
+
async def whatif(whatif_input: WhatifInput):
|
139 |
try:
|
140 |
+
print(whatif_input.question)
|
141 |
+
return generate_whatif_stream(question=whatif_input.question,response=whatif_input.answer)
|
142 |
+
except Exception as e:
|
143 |
+
return {"message": str(e)}
|
144 |
|
145 |
@app.post("/whatif_chat")
|
146 |
async def generate_whatif_chat(user_input: UserInput):
|