Spaces:
Runtime error
Runtime error
Commit
•
6ccb728
1
Parent(s):
054adf6
Update app.py
Browse files
app.py
CHANGED
@@ -32,13 +32,14 @@ DESCRIPTION = """
|
|
32 |
Check that you have successfully completed the hands-on exercise for Unit 7 of the 🤗 Audio Transformers Course by submitting your demo to this Space.
|
33 |
|
34 |
As a reminder, you should start with the template Space provided at [`course-demos/speech-to-speech-translation`](https://huggingface.co/spaces/course-demos/speech-to-speech-translation),
|
35 |
-
and update the Space to translate from any language X to a **non-English** language Y. Your demo should take as input an audio file, and return as output another audio file,
|
36 |
-
[`speech_to_speech_translation`](https://huggingface.co/spaces/course-demos/speech-to-speech-translation/blob/3946ba6705a6632a63de8672ac52a482ab74b3fc/app.py#L35)
|
37 |
function in the template demo.
|
38 |
|
39 |
-
To submit your demo for assessment, give the repo id or URL to your demo. For the template demo, this would be `course-demos/speech-to-speech-translation`.
|
40 |
-
|
41 |
-
|
|
|
42 |
|
43 |
If you experience any issues with using this checker, [open an issue](https://huggingface.co/spaces/huggingface-course/audio-course-u7-assessment/discussions/new)
|
44 |
on this Space and tag [`@sanchit-gandhi`](https://huggingface.co/sanchit-gandhi).
|
@@ -69,7 +70,7 @@ def verify_demo(repo_id):
|
|
69 |
audio_file = client.predict("test_short.wav", api_name="/predict")
|
70 |
except Exception as e:
|
71 |
raise gr.Error(
|
72 |
-
f"Error with querying Space,
|
73 |
)
|
74 |
|
75 |
audio, sampling_rate = sf.read(audio_file)
|
|
|
32 |
Check that you have successfully completed the hands-on exercise for Unit 7 of the 🤗 Audio Transformers Course by submitting your demo to this Space.
|
33 |
|
34 |
As a reminder, you should start with the template Space provided at [`course-demos/speech-to-speech-translation`](https://huggingface.co/spaces/course-demos/speech-to-speech-translation),
|
35 |
+
and update the Space to translate from any language X to a **non-English** language Y. Your demo should take as input an audio file, and return as output another audio file,
|
36 |
+
matching the signature of the [`speech_to_speech_translation`](https://huggingface.co/spaces/course-demos/speech-to-speech-translation/blob/3946ba6705a6632a63de8672ac52a482ab74b3fc/app.py#L35)
|
37 |
function in the template demo.
|
38 |
|
39 |
+
To submit your demo for assessment, give the repo id or URL to your demo. For the template demo, this would be `course-demos/speech-to-speech-translation`.
|
40 |
+
You should ensure that the visibility of your demo is set to **public**. This Space will submit a test file to your demo, and check that the output is
|
41 |
+
non-English audio. If your demo successfully returns an audio file, and this audio file is classified as being non-English, you will pass the Unit and
|
42 |
+
get a green tick next to your name on the overall [course progress space](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course) ✅
|
43 |
|
44 |
If you experience any issues with using this checker, [open an issue](https://huggingface.co/spaces/huggingface-course/audio-course-u7-assessment/discussions/new)
|
45 |
on this Space and tag [`@sanchit-gandhi`](https://huggingface.co/sanchit-gandhi).
|
|
|
70 |
audio_file = client.predict("test_short.wav", api_name="/predict")
|
71 |
except Exception as e:
|
72 |
raise gr.Error(
|
73 |
+
f"Error with querying Space, check that your Space takes an audio file as input and returns an audio as output: {e}"
|
74 |
)
|
75 |
|
76 |
audio, sampling_rate = sf.read(audio_file)
|