Spaces:
Runtime error
Runtime error
Better error message when unable to load space
#3
by
sanchit-gandhi
HF staff
- opened
app.py
CHANGED
@@ -64,7 +64,10 @@ def verify_demo(repo_id):
|
|
64 |
try:
|
65 |
client = Client(repo_id, hf_token=HF_TOKEN)
|
66 |
except Exception as e:
|
67 |
-
raise gr.Error(
|
|
|
|
|
|
|
68 |
|
69 |
try:
|
70 |
audio_file = client.predict("test_short.wav", api_name="/predict")
|
|
|
64 |
try:
|
65 |
client = Client(repo_id, hf_token=HF_TOKEN)
|
66 |
except Exception as e:
|
67 |
+
raise gr.Error("Error with loading Space. First check that your Space has been built and is running."
|
68 |
+
"Then check that your Space takes an audio file as input and returns an audio as output. If it is working"
|
69 |
+
f"as expected and the error persists, open an issue on this Space. Error: {e}"
|
70 |
+
)
|
71 |
|
72 |
try:
|
73 |
audio_file = client.predict("test_short.wav", api_name="/predict")
|