Spaces:
Build error
Build error
omerXfaruq
commited on
Commit
•
ba3ba40
1
Parent(s):
c48f5d1
add a space to examples
Browse files
app.py
CHANGED
@@ -191,12 +191,12 @@ class SpaceBuilder:
|
|
191 |
|
192 |
@staticmethod
|
193 |
def build_space(
|
194 |
-
|
195 |
) -> str:
|
196 |
"""
|
197 |
Creates a space with given input spaces.
|
198 |
|
199 |
-
:param
|
200 |
:param hf_token: HuggingFace token
|
201 |
:param target_space_name: Target Space Name
|
202 |
:param interface_title: Target Interface Title
|
@@ -233,6 +233,7 @@ if __name__ == "__main__":
|
|
233 |
lines=4,
|
234 |
placeholder=(
|
235 |
f"Drop model and space links at each line and I will create a new space comparing them. Usage examples:"
|
|
|
236 |
f"\nmodels/gpt2-large"
|
237 |
f"\nnmodels/gpt2"
|
238 |
),
|
@@ -245,6 +246,6 @@ if __name__ == "__main__":
|
|
245 |
title="Model Comparator Space Builder",
|
246 |
description="Welcome onboard 🤗, I can create a comparative space which will compare the models and/or spaces you provide to me. You can get your HF Write Token from [here](https://huggingface.co/settings/tokens). If you leave HF Token input empty, the space will release under the author's account, [farukozderim](https://huggingface.co/farukozderim). Finally, you can publish spaces as a clone of other spaces if you provide just a single model or space. Have fun :)",
|
247 |
outputs=gr.outputs.HTML(label="URL"),
|
248 |
-
examples= [["
|
249 |
)
|
250 |
iface.launch()
|
|
|
191 |
|
192 |
@staticmethod
|
193 |
def build_space(
|
194 |
+
model_or_space_names: str, hf_token: str, target_space_name: str, interface_title: str, interface_description: str
|
195 |
) -> str:
|
196 |
"""
|
197 |
Creates a space with given input spaces.
|
198 |
|
199 |
+
:param model_or_space_names: Multiple model or space names split with new lines
|
200 |
:param hf_token: HuggingFace token
|
201 |
:param target_space_name: Target Space Name
|
202 |
:param interface_title: Target Interface Title
|
|
|
233 |
lines=4,
|
234 |
placeholder=(
|
235 |
f"Drop model and space links at each line and I will create a new space comparing them. Usage examples:"
|
236 |
+
f"\nspaces/onnx/GPT-2"
|
237 |
f"\nmodels/gpt2-large"
|
238 |
f"\nnmodels/gpt2"
|
239 |
),
|
|
|
246 |
title="Model Comparator Space Builder",
|
247 |
description="Welcome onboard 🤗, I can create a comparative space which will compare the models and/or spaces you provide to me. You can get your HF Write Token from [here](https://huggingface.co/settings/tokens). If you leave HF Token input empty, the space will release under the author's account, [farukozderim](https://huggingface.co/farukozderim). Finally, you can publish spaces as a clone of other spaces if you provide just a single model or space. Have fun :)",
|
248 |
outputs=gr.outputs.HTML(label="URL"),
|
249 |
+
examples= [["spaces/onnx/GPT-2 \nmodels/gpt2-large \nmodels/gpt2", "", "example-name", "example-title", "example-description"]],
|
250 |
)
|
251 |
iface.launch()
|