amarchheda commited on
Commit
aa6ba21
1 Parent(s): 83418c6

removed __init__

Browse files
Files changed (1) hide show
  1. app.py +47 -47
app.py CHANGED
@@ -65,40 +65,7 @@ def list_file_sizes():
65
  for f,s in size_of_file:
66
  print("{} : {}MB".format(f, round(s/(1024*1024),3)))
67
 
68
- css = """
69
- footer {display:none !important}
70
- .output-markdown{display:none !important}
71
- button.primary {
72
- z-index: 14;
73
- left: 0px;
74
- top: 0px;
75
- cursor: pointer !important;
76
- background: none rgb(17, 20, 45) !important;
77
- border: none !important;
78
- color: rgb(255, 255, 255) !important;
79
- line-height: 1 !important;
80
- border-radius: 6px !important;
81
- transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
82
- box-shadow: none !important;
83
- }
84
- button.primary:hover{
85
- z-index: 14;
86
- left: 0px;
87
- top: 0px;
88
- cursor: pointer !important;
89
- background: none rgb(37, 56, 133) !important;
90
- border: none !important;
91
- color: rgb(255, 255, 255) !important;
92
- line-height: 1 !important;
93
- border-radius: 6px !important;
94
- transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
95
- box-shadow: rgb(0 0 0 / 23%) 0px 1px 7px 0px !important;
96
- }
97
- button.gallery-item:hover {
98
- border-color: rgb(37 56 133) !important;
99
- background-color: rgb(229,225,255) !important;
100
- }
101
- """
102
 
103
  def main(audio):
104
 
@@ -178,17 +145,50 @@ def main(audio):
178
  return audio_bytes
179
 
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
 
182
- if __name__ == '__main__':
183
-
184
- demo = gr.Blocks()
185
- mf_transcribe = gr.Interface(
186
- fn=main,
187
- inputs=gr.inputs.Audio(source="microphone", type="filepath"),
188
- outputs="audio",
189
- layout="horizontal",
190
- theme="huggingface",
191
- allow_flagging="never",
192
- css = css
193
- )
194
- mf_transcribe.launch()
 
65
  for f,s in size_of_file:
66
  print("{} : {}MB".format(f, round(s/(1024*1024),3)))
67
 
68
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  def main(audio):
71
 
 
145
  return audio_bytes
146
 
147
 
148
+ css = """
149
+ footer {display:none !important}
150
+ .output-markdown{display:none !important}
151
+ button.primary {
152
+ z-index: 14;
153
+ left: 0px;
154
+ top: 0px;
155
+ cursor: pointer !important;
156
+ background: none rgb(17, 20, 45) !important;
157
+ border: none !important;
158
+ color: rgb(255, 255, 255) !important;
159
+ line-height: 1 !important;
160
+ border-radius: 6px !important;
161
+ transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
162
+ box-shadow: none !important;
163
+ }
164
+ button.primary:hover{
165
+ z-index: 14;
166
+ left: 0px;
167
+ top: 0px;
168
+ cursor: pointer !important;
169
+ background: none rgb(37, 56, 133) !important;
170
+ border: none !important;
171
+ color: rgb(255, 255, 255) !important;
172
+ line-height: 1 !important;
173
+ border-radius: 6px !important;
174
+ transition: box-shadow 200ms ease 0s, background 200ms ease 0s !important;
175
+ box-shadow: rgb(0 0 0 / 23%) 0px 1px 7px 0px !important;
176
+ }
177
+ button.gallery-item:hover {
178
+ border-color: rgb(37 56 133) !important;
179
+ background-color: rgb(229,225,255) !important;
180
+ }
181
+ """
182
 
183
+
184
+ demo = gr.Blocks()
185
+ mf_transcribe = gr.Interface(
186
+ fn=main,
187
+ inputs=gr.inputs.Audio(source="microphone", type="filepath"),
188
+ outputs="audio",
189
+ layout="horizontal",
190
+ theme="huggingface",
191
+ allow_flagging="never",
192
+ css = css
193
+ )
194
+ mf_transcribe.launch()