Chris Addis commited on
Commit
156ba34
·
1 Parent(s): 0e13f7c
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -170,7 +170,7 @@ def create_demo():
170
 
171
  #demo.load(check_authorization, inputs=None, outputs=[auth_state])
172
 
173
- if check_authorization(None):
174
  # free version - yeah baby
175
  login_button = gr.LoginButton()
176
 
@@ -183,7 +183,11 @@ def create_demo():
183
 
184
  # Default model value
185
  default_model = "meta-llama/llama-4-maverick:free"#preferred_models[0][1] # get free model
186
-
 
 
 
 
187
  ################################## normal stuff below
188
  upload_button = gr.UploadButton(
189
  "Click to Upload Images",
 
170
 
171
  #demo.load(check_authorization, inputs=None, outputs=[auth_state])
172
 
173
+ with gr.Group(visible=False) as unauthenticated_ui:
174
  # free version - yeah baby
175
  login_button = gr.LoginButton()
176
 
 
183
 
184
  # Default model value
185
  default_model = "meta-llama/llama-4-maverick:free"#preferred_models[0][1] # get free model
186
+ demo.load(
187
+ fn=check_authorization,
188
+ inputs=None,
189
+ outputs=[unauthenticated_ui]
190
+ )
191
  ################################## normal stuff below
192
  upload_button = gr.UploadButton(
193
  "Click to Upload Images",