Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,11 @@ app = Flask(__name__)
|
|
6 |
API_URL = "https://api-inference.huggingface.co/models/ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"
|
7 |
headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
def query_api(audio_file):
|
10 |
with open(audio_file, "rb") as f:
|
11 |
response = requests.post(API_URL, headers=headers, data=f)
|
|
|
6 |
API_URL = "https://api-inference.huggingface.co/models/ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"
|
7 |
headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
|
8 |
|
9 |
+
@app.route("/")
|
10 |
+
def home():
|
11 |
+
return render("index.html")
|
12 |
+
|
13 |
+
|
14 |
def query_api(audio_file):
|
15 |
with open(audio_file, "rb") as f:
|
16 |
response = requests.post(API_URL, headers=headers, data=f)
|