Pendrokar commited on
Commit
8e17b76
β€’
1 Parent(s): 5691751

get latest model git hash

Browse files
Files changed (2) hide show
  1. README.md +5 -3
  2. app.py +8 -10
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: xVASynth TTS
3
- emoji: πŸ—£
4
  colorFrom: gray
5
  colorTo: gray
6
  sdk: gradio
@@ -17,9 +17,11 @@ tags:
17
  - s2s
18
  pinned: false
19
  preload_from_hub:
20
- - Pendrokar/xvapitch_nvidia 61b10e60b22bc21c1e072f72f1108b9c2b21e94c
21
- - Pendrokar/TorchMoji 58217568daaf64d3621245dd5c88c94e651a08d6
22
  license: gpl-3.0
 
 
23
  ---
24
 
25
  DanRuta's xVASynth, GitHub repo: [https://github.com/DanRuta/xVA-Synth](https://github.com/DanRuta/xVA-Synth)
 
1
  ---
2
  title: xVASynth TTS
3
+ emoji: πŸ§β€β™€οΈπŸ§›β€β™‚οΈπŸ§šβ€β™‚
4
  colorFrom: gray
5
  colorTo: gray
6
  sdk: gradio
 
17
  - s2s
18
  pinned: false
19
  preload_from_hub:
20
+ - Pendrokar/xvapitch_nvidia
21
+ - Pendrokar/TorchMoji
22
  license: gpl-3.0
23
+ thumbnail: >-
24
+ https://raw.githubusercontent.com/DanRuta/xVA-Synth/master/assets/x-icon.png
25
  ---
26
 
27
  DanRuta's xVASynth, GitHub repo: [https://github.com/DanRuta/xVA-Synth](https://github.com/DanRuta/xVA-Synth)
app.py CHANGED
@@ -5,22 +5,19 @@ import requests
5
  import json
6
  from subprocess import Popen, PIPE
7
  import threading
8
- from huggingface_hub import hf_hub_download
9
  import gradio as gr
10
 
11
  # start xVASynth server (no HTTP)
12
- import resources.app.no_server as xvaserver
13
 
 
14
  hf_model_name = "Pendrokar/xvapitch_nvidia"
15
- hf_cache_models_path = '/home/user/.cache/huggingface/hub/models--Pendrokar--xvapitch_nvidia/snapshots/61b10e60b22bc21c1e072f72f1108b9c2b21e94c/'
 
 
16
  models_path = hf_cache_models_path
17
 
18
- # FIXME: currently hardcoded in DeepMoji code
19
- # try:
20
- # os.symlink('/home/user/.cache/huggingface/hub/models--Pendrokar--TorchMoji/snapshots/58217568daaf64d3621245dd5c88c94e651a08d6', '/home/user/app/resources/app/plugins/deepmoji_plugings/model', target_is_directory=True)
21
- # except:
22
- # print('Failed to create symlink to DeepMoji model, may already be there.')
23
-
24
  voice_models = [
25
  ("Male #6671", "ccby_nvidia_hifi_6671_M"),
26
  ("Male #6670", "ccby_nvidia_hifi_6670_M"),
@@ -374,8 +371,9 @@ language_radio = gr.Radio(
374
  _DESCRIPTION = '''
375
  <div>
376
  <a style="display:inline-block;" href="https://github.com/DanRuta/xVA-Synth"><img src='https://img.shields.io/github/stars/DanRuta/xVA-Synth?style=social'/></a>
 
377
  <a style="display:inline-block; margin-left: .5em" href="https://discord.gg/nv7c6E2TzV"><img src='https://img.shields.io/discord/794590496202293278.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2'/></a>
378
- <span style="display: inline-block;margin-left: .5em;vertical-align: top;"><a href="https://huggingface.co/spaces/Pendrokar/xVASynth?duplicate=true" style="" target="_blank"><img style="margin-bottom: 0em;display: inline;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> for a personal CPU-run</span>
379
  </div>
380
  '''
381
 
 
5
  import json
6
  from subprocess import Popen, PIPE
7
  import threading
8
+ from huggingface_hub import Repository
9
  import gradio as gr
10
 
11
  # start xVASynth server (no HTTP)
12
+ # import resources.app.no_server as xvaserver
13
 
14
+ # model
15
  hf_model_name = "Pendrokar/xvapitch_nvidia"
16
+ model_repo = Repository(local_dir=hf_model_name)
17
+ latest_commit_sha = model_repo.git_head_hash()
18
+ hf_cache_models_path = f'/home/user/.cache/huggingface/hub/models--Pendrokar--xvapitch_nvidia/snapshots/{latest_commit_sha}/'
19
  models_path = hf_cache_models_path
20
 
 
 
 
 
 
 
21
  voice_models = [
22
  ("Male #6671", "ccby_nvidia_hifi_6671_M"),
23
  ("Male #6670", "ccby_nvidia_hifi_6670_M"),
 
371
  _DESCRIPTION = '''
372
  <div>
373
  <a style="display:inline-block;" href="https://github.com/DanRuta/xVA-Synth"><img src='https://img.shields.io/github/stars/DanRuta/xVA-Synth?style=social'/></a>
374
+ <a style="display:inline-block;" href="https://www.nexusmods.com/skyrimspecialedition/mods/44184"><img src='https://img.shields.io/badge/Endorsements-3.3k-blue?logo=nexusmods'/></a>
375
  <a style="display:inline-block; margin-left: .5em" href="https://discord.gg/nv7c6E2TzV"><img src='https://img.shields.io/discord/794590496202293278.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2'/></a>
376
+ <span style="display: inline-block;margin-left: .5em;vertical-align: top;"><a href="https://huggingface.co/spaces/Pendrokar/xVASynth?duplicate=true" style="" target="_blank"><img style="margin-bottom: 0em;display: inline;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> for a personal CPU-run one</span>
377
  </div>
378
  '''
379