Spaces:
Runtime error
Runtime error
Commit
·
fb03baa
1
Parent(s):
06fc083
updatedd pydantic
Browse files- app.py +12 -0
- assets/emo-knob-teaser-1.svg +0 -0
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,6 +1,18 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
is_prod = True
|
| 6 |
if os.environ.get('PROD_MODE') == 'local':
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
|
| 4 |
+
import subprocess
|
| 5 |
+
import sys
|
| 6 |
+
|
| 7 |
+
def install(package):
|
| 8 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
| 9 |
+
|
| 10 |
+
try:
|
| 11 |
+
import pydantic
|
| 12 |
+
if pydantic.__version__ != '1.9.0':
|
| 13 |
+
install('pydantic==1.9.0')
|
| 14 |
+
except ImportError:
|
| 15 |
+
install('pydantic==1.9.0')
|
| 16 |
|
| 17 |
is_prod = True
|
| 18 |
if os.environ.get('PROD_MODE') == 'local':
|
assets/emo-knob-teaser-1.svg
ADDED
|
|
requirements.txt
CHANGED
|
@@ -16,5 +16,5 @@ deepfilternet
|
|
| 16 |
pydub
|
| 17 |
soundfile
|
| 18 |
huggingface_hub
|
| 19 |
-
pydantic==1.
|
| 20 |
|
|
|
|
| 16 |
pydub
|
| 17 |
soundfile
|
| 18 |
huggingface_hub
|
| 19 |
+
pydantic==1.9.0
|
| 20 |
|