lodhrangpt commited on
Commit
5a62196
·
verified ·
1 Parent(s): 2f84217

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -54,7 +54,7 @@ def translator(text):
54
  return result
55
 
56
  # Function to process food recognition and get nutrition info
57
- def process_food_result(image, language,progress= gradio.Progress()):
58
  progress(0, desc="Starting")
59
  time.sleep(1)
60
  progress(0.05)
@@ -130,9 +130,8 @@ def process_food_result(image, language,progress= gradio.Progress()):
130
  # Gradio interface function
131
  def gradio_function(image, language):
132
  # Call the process_food_result function to get the output
133
- with gr.Progress(track_tqdm=True):
134
- time.sleep(1) # Simulate delay
135
- result = process_food_result(image, language)
136
  return result
137
 
138
  # Setup the Gradio interface
 
54
  return result
55
 
56
  # Function to process food recognition and get nutrition info
57
+ def process_food_result(image, language,progress= gr.Progress()):
58
  progress(0, desc="Starting")
59
  time.sleep(1)
60
  progress(0.05)
 
130
  # Gradio interface function
131
  def gradio_function(image, language):
132
  # Call the process_food_result function to get the output
133
+
134
+ result = process_food_result(image, language)
 
135
  return result
136
 
137
  # Setup the Gradio interface