Update app/main.py
Browse files- app/main.py +4 -6
app/main.py
CHANGED
|
@@ -9,7 +9,7 @@ app = FastAPI()
|
|
| 9 |
|
| 10 |
|
| 11 |
origins = [
|
| 12 |
-
"https://namanrajput-git.github.io/RT_Digit_Recognizer-Frontend/",
|
| 13 |
|
| 14 |
]
|
| 15 |
|
|
@@ -21,17 +21,15 @@ app.add_middleware(
|
|
| 21 |
allow_headers=["*"],
|
| 22 |
)
|
| 23 |
|
| 24 |
-
|
| 25 |
print("Current working directory:", os.getcwd())
|
| 26 |
print("Files in app folder:", os.listdir("."))
|
| 27 |
|
| 28 |
-
|
| 29 |
model_path = "best_model.h5"
|
| 30 |
model = keras.models.load_model(model_path)
|
| 31 |
-
|
| 32 |
-
# Input schema
|
| 33 |
class InputData(BaseModel):
|
| 34 |
-
pixels: list
|
| 35 |
|
| 36 |
@app.get("/")
|
| 37 |
def root():
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
origins = [
|
| 12 |
+
"https://namanrajput-git.github.io/RT_Digit_Recognizer-Frontend/",
|
| 13 |
|
| 14 |
]
|
| 15 |
|
|
|
|
| 21 |
allow_headers=["*"],
|
| 22 |
)
|
| 23 |
|
| 24 |
+
|
| 25 |
print("Current working directory:", os.getcwd())
|
| 26 |
print("Files in app folder:", os.listdir("."))
|
| 27 |
|
| 28 |
+
|
| 29 |
model_path = "best_model.h5"
|
| 30 |
model = keras.models.load_model(model_path)
|
|
|
|
|
|
|
| 31 |
class InputData(BaseModel):
|
| 32 |
+
pixels: list
|
| 33 |
|
| 34 |
@app.get("/")
|
| 35 |
def root():
|