Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ diffuser_pipeline = DiffusionPipeline.from_pretrained(
|
|
| 21 |
speech_processor=processor,
|
| 22 |
use_auth_token=MY_SECRET_TOKEN,
|
| 23 |
revision="fp16",
|
| 24 |
-
torch_dtype=torch.float16,
|
| 25 |
)
|
| 26 |
|
| 27 |
diffuser_pipeline.enable_attention_slicing()
|
|
@@ -34,10 +34,10 @@ audio_input = gr.Audio(source="microphone")
|
|
| 34 |
image_output = gr.Image()
|
| 35 |
|
| 36 |
def speech_to_text(audio_sample):
|
| 37 |
-
text = audio_sample["text"].lower()
|
| 38 |
-
print(text)
|
| 39 |
-
speech_data = audio_sample["audio"]["array"]
|
| 40 |
-
output = diffuser_pipeline(
|
| 41 |
|
| 42 |
return output.images[0]
|
| 43 |
|
|
|
|
| 21 |
speech_processor=processor,
|
| 22 |
use_auth_token=MY_SECRET_TOKEN,
|
| 23 |
revision="fp16",
|
| 24 |
+
#torch_dtype=torch.float16,
|
| 25 |
)
|
| 26 |
|
| 27 |
diffuser_pipeline.enable_attention_slicing()
|
|
|
|
| 34 |
image_output = gr.Image()
|
| 35 |
|
| 36 |
def speech_to_text(audio_sample):
|
| 37 |
+
#text = audio_sample["text"].lower()
|
| 38 |
+
#print(text)
|
| 39 |
+
#speech_data = audio_sample["audio"]["array"]
|
| 40 |
+
output = diffuser_pipeline(audio_sample)
|
| 41 |
|
| 42 |
return output.images[0]
|
| 43 |
|