piperod91 commited on
Commit
78d19ee
·
1 Parent(s): 92d14a2

adding security

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -113,9 +113,12 @@ with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
113
  classify_image_button.click(classify_image, inputs=[input_image,drop_2], outputs=class_predicted)
114
  #classify_segmented_button.click(classify_image, inputs=[segmented_image,drop_2], outputs=class_predicted)
115
 
116
-
117
 
118
- demo.launch(debug=True)
 
 
 
119
 
120
 
121
 
 
113
  classify_image_button.click(classify_image, inputs=[input_image,drop_2], outputs=class_predicted)
114
  #classify_segmented_button.click(classify_image, inputs=[segmented_image,drop_2], outputs=class_predicted)
115
 
116
+ demo.queue()
117
 
118
+ if os.getenv('SYSTEM') == 'spaces':
119
+ demo.launch(width='40%',auth=(os.environ.get('USERNAME'), os.environ.get('PASSWORD')))
120
+ else:
121
+ demo.launch()
122
 
123
 
124