Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -11,11 +11,11 @@ logger = logging.getLogger(__name__)
|
|
| 11 |
class UserInput(BaseModel):
|
| 12 |
user_input: str
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
|
| 20 |
@app.post("/submit")
|
| 21 |
async def submit_input(input_data: UserInput):
|
|
|
|
| 11 |
class UserInput(BaseModel):
|
| 12 |
user_input: str
|
| 13 |
|
| 14 |
+
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
| 15 |
+
|
| 16 |
+
@app.get("/")
|
| 17 |
+
def index() -> FileResponse:
|
| 18 |
+
return FileResponse(path="/app/static/index.html", media_type="text/html")
|
| 19 |
|
| 20 |
@app.post("/submit")
|
| 21 |
async def submit_input(input_data: UserInput):
|