ryaalbr commited on
Commit
46228a6
1 Parent(s): f7512c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -27,8 +27,7 @@ def rand_image():
27
  return dataset[r]["photo_image_url"] + f"?h={height}" # Unsplash allows dynamic requests, including size of image
28
 
29
  def set_labels(text):
30
- global labels
31
- labels = text.split(",")
32
 
33
  with gr.Blocks() as demo:
34
  labels = gr.State([]) # creates hidden component that can store a value and can be used as input/output; here, initial value is an empty list
 
27
  return dataset[r]["photo_image_url"] + f"?h={height}" # Unsplash allows dynamic requests, including size of image
28
 
29
  def set_labels(text):
30
+ return text.split(",")
 
31
 
32
  with gr.Blocks() as demo:
33
  labels = gr.State([]) # creates hidden component that can store a value and can be used as input/output; here, initial value is an empty list