svummidi commited on
Commit
ae41958
1 Parent(s): ade5f40

Auth added for the app

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -301,7 +301,11 @@ def main_demo():
301
  show_details.change(generate_comment_insights, inputs=[data_sets_dd, topics_dd, show_details],
302
  outputs=gr.Textbox(lines=11, label="Response"))
303
 
304
- demo.launch()
305
-
 
 
 
 
306
 
307
  main_demo()
 
301
  show_details.change(generate_comment_insights, inputs=[data_sets_dd, topics_dd, show_details],
302
  outputs=gr.Textbox(lines=11, label="Response"))
303
 
304
+ if 'LOGIN_PASS' in os.environ:
305
+ demo.launch(auth=('axiamatic', os.environ['LOGIN_PASS']),
306
+ auth_message='For access, please check my Slack profile or contact me in Slack.',
307
+ share=False)
308
+ else:
309
+ demo.launch(share=False)
310
 
311
  main_demo()