Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from huggingface_hub import InferenceClient
|
| 3 |
+
|
| 4 |
+
client = InferenceClient(
|
| 5 |
+
provider="hf-inference",
|
| 6 |
+
api_key=os.environ["HF_TOKEN"],
|
| 7 |
+
)
|
| 8 |
+
|
| 9 |
+
output = client.automatic_speech_recognition("sample1.flac", model="openai/whisper-large-v3")
|