dgbkn commited on
Commit
3ce3e54
·
1 Parent(s): 478099f
Files changed (3) hide show
  1. main.py +3 -1
  2. static/pill_upload.html +3 -0
  3. static/wheat_upload.html +4 -1
main.py CHANGED
@@ -23,7 +23,6 @@ app.add_middleware(
23
  allow_headers=["*"],
24
  )
25
 
26
- app.mount("/", StaticFiles(directory="static"), name="static")
27
 
28
 
29
  @app.post("/predict")
@@ -98,6 +97,9 @@ async def predict_wheat(image: UploadFile = File(...), model_id: str = "grian/1"
98
  return JSONResponse(content={"message": message_to_send, "count": predicted_count, "predicted_image": predicted_image_str})
99
 
100
 
 
 
 
101
  @app.get("/")
102
  async def home():
103
  return HTMLResponse(content="<html><head><meta http-equiv='refresh' content='0; url=/index.html'></head></html>")
 
23
  allow_headers=["*"],
24
  )
25
 
 
26
 
27
 
28
  @app.post("/predict")
 
97
  return JSONResponse(content={"message": message_to_send, "count": predicted_count, "predicted_image": predicted_image_str})
98
 
99
 
100
+
101
+ app.mount("/", StaticFiles(directory="static"), name="static")
102
+
103
  @app.get("/")
104
  async def home():
105
  return HTMLResponse(content="<html><head><meta http-equiv='refresh' content='0; url=/index.html'></head></html>")
static/pill_upload.html CHANGED
@@ -26,6 +26,9 @@
26
 
27
  <button id="cameraButton" class="bg-red-500 text-white px-4 py-2 rounded">Take Photo</button>
28
  <button id="galleryButton" class="bg-green-500 text-white px-4 py-2 rounded">Choose from Gallery</button>
 
 
 
29
 
30
  <!-- <img src="/upload.png" alt="Click to Upload" class="clickable-image mb-4" onclick="triggerFileInput()"> -->
31
 
 
26
 
27
  <button id="cameraButton" class="bg-red-500 text-white px-4 py-2 rounded">Take Photo</button>
28
  <button id="galleryButton" class="bg-green-500 text-white px-4 py-2 rounded">Choose from Gallery</button>
29
+ <br>
30
+ <br>
31
+ <br>
32
 
33
  <!-- <img src="/upload.png" alt="Click to Upload" class="clickable-image mb-4" onclick="triggerFileInput()"> -->
34
 
static/wheat_upload.html CHANGED
@@ -26,7 +26,10 @@
26
 
27
  <button id="cameraButton" class="bg-red-500 text-white px-4 py-2 rounded">Take Photo</button>
28
  <button id="galleryButton" class="bg-green-500 text-white px-4 py-2 rounded">Choose from Gallery</button>
29
-
 
 
 
30
  <!-- <img src="/upload.png" alt="Click to Upload" class="clickable-image mb-4" onclick="triggerFileInput()"> -->
31
 
32
  <!-- Dropdown for selecting model_id -->
 
26
 
27
  <button id="cameraButton" class="bg-red-500 text-white px-4 py-2 rounded">Take Photo</button>
28
  <button id="galleryButton" class="bg-green-500 text-white px-4 py-2 rounded">Choose from Gallery</button>
29
+ <br>
30
+ <br>
31
+ <br>
32
+
33
  <!-- <img src="/upload.png" alt="Click to Upload" class="clickable-image mb-4" onclick="triggerFileInput()"> -->
34
 
35
  <!-- Dropdown for selecting model_id -->