minemaster01 commited on
Commit
6ffc297
·
verified ·
1 Parent(s): ecbc96c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -48,7 +48,12 @@ states_by_country = {
48
  "Central", "Eastern", "North Central", "Northern", "North Western", "Sabaragamuwa", "Southern", "Uva", "Western"
49
  ]
50
  }
51
-
 
 
 
 
 
52
  def setup_hf_dataset():
53
  """Initialize the Hugging Face dataset if it doesn't exist"""
54
  global DATASET_CREATED
@@ -158,11 +163,16 @@ with gr.Blocks() as gradio_app:
158
  # Left column for image upload and basic information
159
  with gr.Column(scale=1):
160
  input_img = gr.Image(label="Upload an image", sources=['upload', 'webcam'], type="pil")
161
- language = gr.Textbox(label="Language:", placeholder="Native Language")
 
 
 
 
 
162
 
163
  # Location information in the left column
164
  country_dropdown = gr.Dropdown(
165
- choices=["India", "Pakistan", "Bangladesh", "Afghanistan", "Bhutan", "Nepal", "Sri Lanka"],
166
  label="Country where the image was taken:",
167
  interactive=True
168
  )
 
48
  "Central", "Eastern", "North Central", "Northern", "North Western", "Sabaragamuwa", "Southern", "Uva", "Western"
49
  ]
50
  }
51
+ south_asian_languages = [
52
+ "Hindi", "Bengali", "Urdu", "Punjabi", "Tamil", "Telugu",
53
+ "Marathi", "Gujarati", "Kannada", "Malayalam", "Odia",
54
+ "Sindhi", "Nepali", "Sinhala", "Pashto", "Dari",
55
+ "Dzongkha", "Assamese", "Kashmiri", "Sanskrit", "Other"
56
+ ]
57
  def setup_hf_dataset():
58
  """Initialize the Hugging Face dataset if it doesn't exist"""
59
  global DATASET_CREATED
 
163
  # Left column for image upload and basic information
164
  with gr.Column(scale=1):
165
  input_img = gr.Image(label="Upload an image", sources=['upload', 'webcam'], type="pil")
166
+ language = gr.Dropdown(
167
+ choices=south_asian_languages,
168
+ label="Language:",
169
+ info="Select the native language relevant to the image",
170
+ interactive=True
171
+ )
172
 
173
  # Location information in the left column
174
  country_dropdown = gr.Dropdown(
175
+ choices=["None","India", "Pakistan", "Bangladesh", "Afghanistan", "Bhutan", "Nepal", "Sri Lanka"],
176
  label="Country where the image was taken:",
177
  interactive=True
178
  )