yukiakai commited on
Commit
6a41733
·
verified ·
1 Parent(s): b5a16fb

fix: broken cover image

Browse files

change to base64 type to missing access

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -136,6 +136,7 @@ if __name__ == '__main__':
136
  cover = f"pretrained_models/{i}/{info['cover']}"
137
  example = info['example']
138
  language = info['language']
 
139
  net_g_ms = SynthesizerTrn(
140
  len(hps_ms.symbols),
141
  hps_ms.data.filter_length // 2 + 1,
@@ -149,7 +150,6 @@ if __name__ == '__main__':
149
  gr.Markdown(
150
  "# <center> vits-models\n"
151
  "## <center> Please do not generate content that could infringe upon the rights or cause harm to individuals or organizations.\n"
152
- "## <center> 请不要生成会对个人以及组织造成侵害的内容\n\n"
153
  "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/10QOk9NPgoKZUXkIhhuVaZ7SYra1MPMKH?usp=share_link)\n\n"
154
  "[![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm-dark.svg)](https://huggingface.co/spaces/sayashi/vits-models?duplicate=true)\n\n"
155
  "[![Finetune your own model](https://badgen.net/badge/icon/github?icon=github&label=Finetune%20your%20own%20model)](https://github.com/SayaSS/vits-finetuning)"
@@ -167,7 +167,7 @@ if __name__ == '__main__':
167
  gr.Markdown(
168
  '<div align="center">'
169
  f'<a><strong>{title}</strong></a>'
170
- f'<img style="width:auto;height:300px;" src="file/{cover}">' if cover else ""
171
  '</div>'
172
  )
173
  with gr.Row():
@@ -226,7 +226,7 @@ if __name__ == '__main__':
226
  gr.Markdown(
227
  '<div align="center">'
228
  f'<a><strong>{title}</strong></a>'
229
- f'<img style="width:auto;height:300px;" src="file/{cover}">' if cover else ""
230
  '</div>'
231
  )
232
  with gr.Row():
 
136
  cover = f"pretrained_models/{i}/{info['cover']}"
137
  example = info['example']
138
  language = info['language']
139
+ image_cover = client_utils.encode_url_or_file_to_base64(cover)
140
  net_g_ms = SynthesizerTrn(
141
  len(hps_ms.symbols),
142
  hps_ms.data.filter_length // 2 + 1,
 
150
  gr.Markdown(
151
  "# <center> vits-models\n"
152
  "## <center> Please do not generate content that could infringe upon the rights or cause harm to individuals or organizations.\n"
 
153
  "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/10QOk9NPgoKZUXkIhhuVaZ7SYra1MPMKH?usp=share_link)\n\n"
154
  "[![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm-dark.svg)](https://huggingface.co/spaces/sayashi/vits-models?duplicate=true)\n\n"
155
  "[![Finetune your own model](https://badgen.net/badge/icon/github?icon=github&label=Finetune%20your%20own%20model)](https://github.com/SayaSS/vits-finetuning)"
 
167
  gr.Markdown(
168
  '<div align="center">'
169
  f'<a><strong>{title}</strong></a>'
170
+ f'<img style="width:auto;height:300px;" src="{cover}">' if cover else ""
171
  '</div>'
172
  )
173
  with gr.Row():
 
226
  gr.Markdown(
227
  '<div align="center">'
228
  f'<a><strong>{title}</strong></a>'
229
+ f'<img style="width:auto;height:300px;" src="{image_cover}">' if cover else ""
230
  '</div>'
231
  )
232
  with gr.Row():