jbilcke-hf HF staff commited on
Commit
f75013b
·
verified ·
1 Parent(s): 5847fd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -6,14 +6,12 @@ from transformers import AutoTokenizer, AutoFeatureExtractor, set_seed
6
 
7
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
8
 
9
-
10
  repo_id = "parler-tts/parler_tts_mini_v0.1"
11
 
12
  model = ParlerTTSForConditionalGeneration.from_pretrained(repo_id).to(device)
13
  tokenizer = AutoTokenizer.from_pretrained(repo_id)
14
  feature_extractor = AutoFeatureExtractor.from_pretrained(repo_id)
15
 
16
-
17
  SAMPLE_RATE = feature_extractor.sampling_rate
18
  SEED = 42
19
 
@@ -44,7 +42,7 @@ def gen_tts(secret_token, text, description):
44
 
45
 
46
  with gr.Blocks() as block:
47
- gr.HTML("""
48
  <div style="z-index: 100; position: fixed; top: 0px; right: 0px; left: 0px; bottom: 0px; width: 100%; height: 100%; background: white; display: flex; align-items: center; justify-content: center; color: black;">
49
  <div style="text-align: center; color: black;">
50
  <p style="color: black;">This space is a headless component of the cloud rendering engine used by AiTube.</p>
@@ -61,6 +59,5 @@ with gr.Blocks() as block:
61
  outputs = [audio_out]
62
  run_button.click(fn=gen_tts, inputs=inputs, outputs=outputs, queue=True)
63
 
64
-
65
  block.queue()
66
  block.launch(share=True)
 
6
 
7
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
8
 
 
9
  repo_id = "parler-tts/parler_tts_mini_v0.1"
10
 
11
  model = ParlerTTSForConditionalGeneration.from_pretrained(repo_id).to(device)
12
  tokenizer = AutoTokenizer.from_pretrained(repo_id)
13
  feature_extractor = AutoFeatureExtractor.from_pretrained(repo_id)
14
 
 
15
  SAMPLE_RATE = feature_extractor.sampling_rate
16
  SEED = 42
17
 
 
42
 
43
 
44
  with gr.Blocks() as block:
45
+ gr.HTML("""
46
  <div style="z-index: 100; position: fixed; top: 0px; right: 0px; left: 0px; bottom: 0px; width: 100%; height: 100%; background: white; display: flex; align-items: center; justify-content: center; color: black;">
47
  <div style="text-align: center; color: black;">
48
  <p style="color: black;">This space is a headless component of the cloud rendering engine used by AiTube.</p>
 
59
  outputs = [audio_out]
60
  run_button.click(fn=gen_tts, inputs=inputs, outputs=outputs, queue=True)
61
 
 
62
  block.queue()
63
  block.launch(share=True)