Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,9 +43,7 @@ def predict():
|
|
43 |
return render_template('index.html', prediction_text="Error: " + str(e))
|
44 |
|
45 |
# Initialize FastAPI app
|
46 |
-
|
47 |
|
48 |
# Mount Flask app inside FastAPI using WSGIMiddleware
|
49 |
-
|
50 |
-
|
51 |
-
# If you want to use FastAPI routes here, you can do so, but the Flask app will handle the main web functionality.
|
|
|
43 |
return render_template('index.html', prediction_text="Error: " + str(e))
|
44 |
|
45 |
# Initialize FastAPI app
|
46 |
+
app = FastAPI() # Rename fastapi_app to app
|
47 |
|
48 |
# Mount Flask app inside FastAPI using WSGIMiddleware
|
49 |
+
app.mount("/", WSGIMiddleware(flask_app))
|
|
|
|