Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,10 @@ from gtts import gTTS
|
|
7 |
from dotenv import load_dotenv
|
8 |
import os
|
9 |
|
|
|
10 |
model_id = "sanchit-gandhi/whisper-small-dv" # update with your model id
|
11 |
pipe = pipeline("automatic-speech-recognition", model=model_id)
|
12 |
hugging_face_token=os.getenv("HUGGING_FACE_TOKEN")
|
13 |
-
|
14 |
async def query(text, model_id="tiiuae/falcon-7b-instruct"):
|
15 |
api_url = f"https://api-inference.huggingface.co/models/{model_id}"
|
16 |
headers = {"Authorization": f"Bearer {hugging_face_token}"}
|
|
|
7 |
from dotenv import load_dotenv
|
8 |
import os
|
9 |
|
10 |
+
load_dotenv()
|
11 |
model_id = "sanchit-gandhi/whisper-small-dv" # update with your model id
|
12 |
pipe = pipeline("automatic-speech-recognition", model=model_id)
|
13 |
hugging_face_token=os.getenv("HUGGING_FACE_TOKEN")
|
|
|
14 |
async def query(text, model_id="tiiuae/falcon-7b-instruct"):
|
15 |
api_url = f"https://api-inference.huggingface.co/models/{model_id}"
|
16 |
headers = {"Authorization": f"Bearer {hugging_face_token}"}
|