Chronos-png commited on
Commit
d5cf862
·
verified ·
1 Parent(s): 840c996

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
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
- fastapi_app = FastAPI()
47
 
48
  # Mount Flask app inside FastAPI using WSGIMiddleware
49
- fastapi_app.mount("/", WSGIMiddleware(flask_app))
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))