Spaces:
Build error
Build error
Commit
·
b0b5c7c
1
Parent(s):
8ca56b3
small refactors
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ class SpaceBuilder:
|
|
28 |
filtered_list = []
|
29 |
for name in name_list:
|
30 |
if not (name == "" or name.isspace()):
|
31 |
-
filtered_list.append(name)
|
32 |
return filtered_list
|
33 |
|
34 |
@classmethod
|
@@ -178,7 +178,7 @@ class SpaceBuilder:
|
|
178 |
cls.error_message = f"The {repo_name} is already used for the given token's user"
|
179 |
return False
|
180 |
else:
|
181 |
-
print("The space name is available")
|
182 |
return True
|
183 |
except Exception as ex:
|
184 |
print(ex)
|
@@ -227,8 +227,8 @@ if __name__ == "__main__":
|
|
227 |
lines=4,
|
228 |
placeholder=(
|
229 |
f"Drop space links at each line and I will create a new space comparing them. ie:"
|
230 |
-
f"\
|
231 |
-
f"\
|
232 |
),
|
233 |
),
|
234 |
gr.inputs.Textbox(lines=1, placeholder="HuggingFace Write Token"),
|
|
|
28 |
filtered_list = []
|
29 |
for name in name_list:
|
30 |
if not (name == "" or name.isspace()):
|
31 |
+
filtered_list.append(f"spaces/{name}")
|
32 |
return filtered_list
|
33 |
|
34 |
@classmethod
|
|
|
178 |
cls.error_message = f"The {repo_name} is already used for the given token's user"
|
179 |
return False
|
180 |
else:
|
181 |
+
print(f"The space name {repo_name} is available")
|
182 |
return True
|
183 |
except Exception as ex:
|
184 |
print(ex)
|
|
|
227 |
lines=4,
|
228 |
placeholder=(
|
229 |
f"Drop space links at each line and I will create a new space comparing them. ie:"
|
230 |
+
f"\nNorod78/ComicsHeroHD"
|
231 |
+
f"\nAmrrs/gradio-sentiment-analyzer"
|
232 |
),
|
233 |
),
|
234 |
gr.inputs.Textbox(lines=1, placeholder="HuggingFace Write Token"),
|