Spaces:
Running
Running
Commit
·
8812323
1
Parent(s):
224d485
Update app.py
Browse files
app.py
CHANGED
@@ -182,11 +182,11 @@ def check_civit_link(profile: Optional[gr.OAuthProfile], url):
|
|
182 |
info, _ = process_url(url, download_files=False)
|
183 |
hf_username = extract_huggingface_username(info['creator'])
|
184 |
print(hf_username)
|
185 |
-
print(profile
|
186 |
if(not hf_username):
|
187 |
no_username_text = 'Oops, your CivitAI profile seems to not have information about your Hugging Face account. Please visit <a href="https://civitai.com/user/account">https://civitai.com/user/account</a> and include it there<br><img width="60%" src="https://i.imgur.com/hCbo9uL.png" />'
|
188 |
return no_username_text, gr.update(), gr.update(visible=True)
|
189 |
-
if(profile.
|
190 |
unmatched_username_text = 'Oops, the Hugging Face account in your CivitAI profile seems to be different than the one your are using here. Please visit <a href="https://civitai.com/user/account">https://civitai.com/user/account</a> and update it there<br><img src="https://i.imgur.com/hCbo9uL.png" />'
|
191 |
return unmatched_username_text, gr.update(), gr.update(visible=True)
|
192 |
else:
|
|
|
182 |
info, _ = process_url(url, download_files=False)
|
183 |
hf_username = extract_huggingface_username(info['creator'])
|
184 |
print(hf_username)
|
185 |
+
print(dir(profile))
|
186 |
if(not hf_username):
|
187 |
no_username_text = 'Oops, your CivitAI profile seems to not have information about your Hugging Face account. Please visit <a href="https://civitai.com/user/account">https://civitai.com/user/account</a> and include it there<br><img width="60%" src="https://i.imgur.com/hCbo9uL.png" />'
|
188 |
return no_username_text, gr.update(), gr.update(visible=True)
|
189 |
+
if(profile.user != hf_username):
|
190 |
unmatched_username_text = 'Oops, the Hugging Face account in your CivitAI profile seems to be different than the one your are using here. Please visit <a href="https://civitai.com/user/account">https://civitai.com/user/account</a> and update it there<br><img src="https://i.imgur.com/hCbo9uL.png" />'
|
191 |
return unmatched_username_text, gr.update(), gr.update(visible=True)
|
192 |
else:
|