Spaces:
Sleeping
Sleeping
dlaiu commited on
Commit ·
e51d7c2
1
Parent(s): 942f623
fix: back to gradio 4.41.0, pin fastapi<0.112 to keep starlette 0.36.x compat
Browse files- README.md +1 -1
- app.py +9 -0
- requirements.txt +1 -0
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🐢
|
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
python_version: "3.11"
|
|
|
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.41.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
python_version: "3.11"
|
app.py
CHANGED
|
@@ -4,6 +4,15 @@ from parselmouth.praat import call
|
|
| 4 |
import numpy as np
|
| 5 |
import pandas as pd
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
def find_rises_and_peaks_gradient(data, threshold=4):
|
| 8 |
data['rise_point'] = 0
|
| 9 |
data['peak_point'] = 0
|
|
|
|
| 4 |
import numpy as np
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
+
# gradio_client 1.3.0 crashes when a JSON Schema has additionalProperties: false (a boolean)
|
| 8 |
+
import gradio_client.utils as _gcu
|
| 9 |
+
_orig = _gcu._json_schema_to_python_type
|
| 10 |
+
def _safe(schema, defs=None):
|
| 11 |
+
if not isinstance(schema, dict):
|
| 12 |
+
return "any"
|
| 13 |
+
return _orig(schema, defs)
|
| 14 |
+
_gcu._json_schema_to_python_type = _safe
|
| 15 |
+
|
| 16 |
def find_rises_and_peaks_gradient(data, threshold=4):
|
| 17 |
data['rise_point'] = 0
|
| 18 |
data['peak_point'] = 0
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
praat-parselmouth
|
| 2 |
huggingface_hub<0.25
|
|
|
|
|
|
| 1 |
praat-parselmouth
|
| 2 |
huggingface_hub<0.25
|
| 3 |
+
fastapi<0.112.0
|