Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -213,13 +213,13 @@ async def receive_form_data(request: Request):
|
|
| 213 |
}
|
| 214 |
a=sf.Lead.create(data)
|
| 215 |
# Generate a unique ID (for tracking user)
|
| 216 |
-
unique_id =
|
| 217 |
|
| 218 |
# Here you can do something with form_data like saving it to a database
|
| 219 |
print("Received form data:", form_data)
|
| 220 |
|
| 221 |
# Send back the unique id to the frontend
|
| 222 |
-
return JSONResponse({"id":
|
| 223 |
|
| 224 |
@app.post("/chat/")
|
| 225 |
async def chat(request: MessageRequest):
|
|
|
|
| 213 |
}
|
| 214 |
a=sf.Lead.create(data)
|
| 215 |
# Generate a unique ID (for tracking user)
|
| 216 |
+
unique_id = a['id']
|
| 217 |
|
| 218 |
# Here you can do something with form_data like saving it to a database
|
| 219 |
print("Received form data:", form_data)
|
| 220 |
|
| 221 |
# Send back the unique id to the frontend
|
| 222 |
+
return JSONResponse({"id": unique_id})
|
| 223 |
|
| 224 |
@app.post("/chat/")
|
| 225 |
async def chat(request: MessageRequest):
|