jays009 commited on
Commit
871b5a8
·
verified ·
1 Parent(s): 170be68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ from PIL import Image
6
  import requests
7
  import base64
8
  from io import BytesIO
 
9
 
10
  # Define the number of classes
11
  num_classes = 2 # Update with the actual number of classes in your dataset
@@ -71,7 +72,7 @@ iface = gr.Interface(
71
  fn=process_image,
72
  inputs=[
73
  gr.File(label="Upload an image (Local File Path)"), # Input: Local file
74
- gr.Textbox(label="Enter Image URL", placeholder="Enter image URL here (optional)", optional=True) # Input: Image URL (optional)
75
  ],
76
  outputs=gr.Textbox(label="Prediction Result"), # Output: Prediction result
77
  live=True,
 
6
  import requests
7
  import base64
8
  from io import BytesIO
9
+ import os
10
 
11
  # Define the number of classes
12
  num_classes = 2 # Update with the actual number of classes in your dataset
 
72
  fn=process_image,
73
  inputs=[
74
  gr.File(label="Upload an image (Local File Path)"), # Input: Local file
75
+ gr.Textbox(label="Enter Image URL", placeholder="Enter image URL here", lines=1) # Input: Image URL
76
  ],
77
  outputs=gr.Textbox(label="Prediction Result"), # Output: Prediction result
78
  live=True,