Spaces:
Runtime error
Runtime error
feat: working result message
Browse files- main.py +1 -1
- static/index.html +1 -1
main.py
CHANGED
|
@@ -32,7 +32,7 @@ async def classify_doc(files: List[UploadFile] = File(...)):
|
|
| 32 |
return {"message": "There was an error in uploading file(s)"}
|
| 33 |
finally:
|
| 34 |
file.file.close()
|
| 35 |
-
return {"message": f"
|
| 36 |
|
| 37 |
|
| 38 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
|
|
|
| 32 |
return {"message": "There was an error in uploading file(s)"}
|
| 33 |
finally:
|
| 34 |
file.file.close()
|
| 35 |
+
return {"message": f"{[file.filename for file in files]} : {[classify_res for file in files]}"}
|
| 36 |
|
| 37 |
|
| 38 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
static/index.html
CHANGED
|
@@ -35,7 +35,7 @@
|
|
| 35 |
<input id="img-input" type="file" multiple="multiple" accept="image/jpeg, image/png, image/jpg">
|
| 36 |
<button id="classify-btn"></button>
|
| 37 |
<p id="test-output"></p>
|
| 38 |
-
<p id="img-output">
|
| 39 |
</section>
|
| 40 |
</main>
|
| 41 |
</body>
|
|
|
|
| 35 |
<input id="img-input" type="file" multiple="multiple" accept="image/jpeg, image/png, image/jpg">
|
| 36 |
<button id="classify-btn"></button>
|
| 37 |
<p id="test-output"></p>
|
| 38 |
+
<p id="img-output"></p>
|
| 39 |
</section>
|
| 40 |
</main>
|
| 41 |
</body>
|