Commit
•
214d6ac
1
Parent(s):
1ecbae3
Update app.py
Browse files
app.py
CHANGED
@@ -241,7 +241,10 @@ Sample pictures of:
|
|
241 |
text_file = open("token_identifier.txt", "w")
|
242 |
text_file.write(', '.join(instance_prompt_list))
|
243 |
text_file.close()
|
244 |
-
|
|
|
|
|
|
|
245 |
operations = [
|
246 |
CommitOperationAdd(path_in_repo="token_identifier.txt", path_or_fileobj="token_identifier.txt"),
|
247 |
CommitOperationAdd(path_in_repo="README.md", path_or_fileobj="model.README.md"),
|
|
|
241 |
text_file = open("token_identifier.txt", "w")
|
242 |
text_file.write(', '.join(instance_prompt_list))
|
243 |
text_file.close()
|
244 |
+
try:
|
245 |
+
create_repo(model_id,private=True, token=hf_token)
|
246 |
+
except:
|
247 |
+
create_repo(f"{model_id}-new", private=True,token=hf_token)
|
248 |
operations = [
|
249 |
CommitOperationAdd(path_in_repo="token_identifier.txt", path_or_fileobj="token_identifier.txt"),
|
250 |
CommitOperationAdd(path_in_repo="README.md", path_or_fileobj="model.README.md"),
|