deepkyu commited on
Commit
f10e37f
1 Parent(s): afbc1dd

Fix package version conflict

Browse files
Files changed (2) hide show
  1. app.py +11 -0
  2. requirements.txt +2 -3
app.py CHANGED
@@ -1,6 +1,17 @@
1
  # https://huggingface.co/deepkyu/ml-talking-face
2
  import os
3
  import subprocess
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  REST_IP = os.environ['REST_IP']
6
  SERVICE_PORT = int(os.environ['SERVICE_PORT'])
 
1
  # https://huggingface.co/deepkyu/ml-talking-face
2
  import os
3
  import subprocess
4
+ import pkg_resources
5
+
6
+ library = 'httpx'
7
+ installed_version = pkg_resources.get_distribution(library).version
8
+
9
+ desired_version = '0.25.0'
10
+
11
+ if installed_version != desired_version:
12
+ subprocess.run(f'pip install --force-reinstall {library}=={desired_version}', shell=True)
13
+ print(f"Package is installed with newer version: {library}=={desired_version}")
14
+
15
 
16
  REST_IP = os.environ['REST_IP']
17
  SERVICE_PORT = int(os.environ['SERVICE_PORT'])
requirements.txt CHANGED
@@ -1,8 +1,7 @@
1
- gradio
2
  jinja2
3
  googletrans==4.0.0-rc1
4
  PyYAML
5
  opencv-python
6
  google-cloud-translate
7
- google-api-python-client
8
- httpx==0.25.0
 
1
+ gradio==4.13.0
2
  jinja2
3
  googletrans==4.0.0-rc1
4
  PyYAML
5
  opencv-python
6
  google-cloud-translate
7
+ google-api-python-client