Spaces:
Build error
Build error
Commit
•
19ecd98
1
Parent(s):
0295b84
Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,6 @@ import requests
|
|
5 |
import gradio as gr
|
6 |
|
7 |
from huggingface_hub import (
|
8 |
-
hf_hub_url,
|
9 |
-
cached_download,
|
10 |
create_repo,
|
11 |
get_full_repo_name,
|
12 |
upload_file,
|
@@ -70,6 +68,10 @@ def control_input_and_output_types(interface_list: List["gr.Interface"]) -> bool
|
|
70 |
return True
|
71 |
|
72 |
|
|
|
|
|
|
|
|
|
73 |
|
74 |
|
75 |
def space_builder(spaces: str, hf_token: str, username: str, space_name: str, space_description: str) -> str:
|
@@ -82,8 +84,8 @@ def space_builder(spaces: str, hf_token: str, username: str, space_name: str, sp
|
|
82 |
:param space_description:
|
83 |
:return:
|
84 |
"""
|
85 |
-
return "Thank you for using the draft, it will be completed later"
|
86 |
-
|
87 |
|
88 |
|
89 |
iface = gr.Interface(
|
|
|
5 |
import gradio as gr
|
6 |
|
7 |
from huggingface_hub import (
|
|
|
|
|
8 |
create_repo,
|
9 |
get_full_repo_name,
|
10 |
upload_file,
|
|
|
68 |
return True
|
69 |
|
70 |
|
71 |
+
def check_space_availability(hf_token: str, space_name: str) -> str:
|
72 |
+
repo_name = get_full_repo_name(model_id=space_name, token=hf_token)
|
73 |
+
# requests.get()
|
74 |
+
return repo_name
|
75 |
|
76 |
|
77 |
def space_builder(spaces: str, hf_token: str, username: str, space_name: str, space_description: str) -> str:
|
|
|
84 |
:param space_description:
|
85 |
:return:
|
86 |
"""
|
87 |
+
# return "Thank you for using the draft, it will be completed later"
|
88 |
+
return check_space_availability(hf_token, space_name)
|
89 |
|
90 |
|
91 |
iface = gr.Interface(
|