Update main.py
Browse files
main.py
CHANGED
|
@@ -19,8 +19,7 @@ import base64
|
|
| 19 |
@app.post("/upload/")
|
| 20 |
async def upload_file(file: UploadFile = File(...)):
|
| 21 |
contents = await file.read()
|
| 22 |
-
|
| 23 |
-
result = client.predict(base64_contents, api_name="/predict")
|
| 24 |
return {"sketch_image": result[0]}
|
| 25 |
|
| 26 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
|
|
|
| 19 |
@app.post("/upload/")
|
| 20 |
async def upload_file(file: UploadFile = File(...)):
|
| 21 |
contents = await file.read()
|
| 22 |
+
result = client.predict(contents, api_name="/predict")
|
|
|
|
| 23 |
return {"sketch_image": result[0]}
|
| 24 |
|
| 25 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|