SakshiRathi77 commited on
Commit
71b3330
1 Parent(s): 2f2f365

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -5,10 +5,12 @@ from transformers import pipeline
5
  from huggingface_hub import model_info
6
  import time
7
  import unicodedata
 
8
 
9
  MODEL_NAME = "SakshiRathi77/wav2vec2-large-xlsr-300m-hi-kagglex"
10
  lang = "hi"
11
 
 
12
  device = 0 if torch.cuda.is_available() else "cpu"
13
  pipe = pipeline(
14
  task="automatic-speech-recognition",
@@ -41,7 +43,7 @@ def rt_transcribe(audio, state=""):
41
 
42
 
43
 
44
- demo = gr.Blocks()
45
  examples=[["examples/example1.mp3"], ["examples/example2.mp3"],["examples/example3.mp3"]]
46
 
47
  title ="""
@@ -67,7 +69,7 @@ mf_transcribe = gr.Interface(
67
  gr.inputs.Audio(source="upload", type="filepath"),
68
  ],
69
  outputs="text",
70
- theme="huggingface",
71
  title=title,
72
  description= description ,
73
  allow_flagging="never",
@@ -82,7 +84,7 @@ rt_transcribe = gr.Interface(
82
  ],
83
  outputs=[ "textbox",
84
  "state"],
85
- theme="huggingface",
86
  title=title,
87
  description= description ,
88
  allow_flagging="never",
 
5
  from huggingface_hub import model_info
6
  import time
7
  import unicodedata
8
+ from gradio.themes.utils.theme_dropdown import create_theme_dropdown
9
 
10
  MODEL_NAME = "SakshiRathi77/wav2vec2-large-xlsr-300m-hi-kagglex"
11
  lang = "hi"
12
 
13
+ my_theme = gr.Theme.from_hub('freddyaboulton/dracula_revamped')
14
  device = 0 if torch.cuda.is_available() else "cpu"
15
  pipe = pipeline(
16
  task="automatic-speech-recognition",
 
43
 
44
 
45
 
46
+ demo = gr.Blocks(theme=my_theme)
47
  examples=[["examples/example1.mp3"], ["examples/example2.mp3"],["examples/example3.mp3"]]
48
 
49
  title ="""
 
69
  gr.inputs.Audio(source="upload", type="filepath"),
70
  ],
71
  outputs="text",
72
+ # theme="huggingface",
73
  title=title,
74
  description= description ,
75
  allow_flagging="never",
 
84
  ],
85
  outputs=[ "textbox",
86
  "state"],
87
+ # theme="huggingface",
88
  title=title,
89
  description= description ,
90
  allow_flagging="never",