Spaces:
Runtime error
Runtime error
Create main.py
Browse files
main.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI, HTTPException, Body
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.post("/question/")
|
| 6 |
+
async def read_question(question: str = Body(..., embed=True)):
|
| 7 |
+
return {"Received Question": question}
|
| 8 |
+
|
| 9 |
+
@app.post("/opportunity/")
|
| 10 |
+
async def read_opportunity(opportunity: str = Body(..., embed=True)):
|
| 11 |
+
return {"Received Opportunity": opportunity}
|