Spaces:
Sleeping
Sleeping
Aditya DN
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,12 +74,13 @@
|
|
| 74 |
import requests
|
| 75 |
import gradio as gr
|
| 76 |
import os
|
|
|
|
| 77 |
|
| 78 |
# Function to recognize audio from URL or uploaded file
|
| 79 |
def recognize_audio(choice, url, file):
|
| 80 |
api_url = os.getenv("API_URL")
|
| 81 |
api_token = os.getenv("API_TOKEN")
|
| 82 |
-
params = os.getenv("PARAMS")
|
| 83 |
|
| 84 |
if choice == "URL":
|
| 85 |
if not url:
|
|
|
|
| 74 |
import requests
|
| 75 |
import gradio as gr
|
| 76 |
import os
|
| 77 |
+
import json
|
| 78 |
|
| 79 |
# Function to recognize audio from URL or uploaded file
|
| 80 |
def recognize_audio(choice, url, file):
|
| 81 |
api_url = os.getenv("API_URL")
|
| 82 |
api_token = os.getenv("API_TOKEN")
|
| 83 |
+
params = json.dumps(os.getenv("PARAMS"), indent=4)
|
| 84 |
|
| 85 |
if choice == "URL":
|
| 86 |
if not url:
|