Spaces:
Runtime error
Runtime error
Commit
·
f5c44a6
1
Parent(s):
4b510ea
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,86 @@ def transcribe_yt(link):
|
|
50 |
path = yt.streams.filter(only_audio=True)[0].download(filename="audio.mp3")
|
51 |
return transcribe(path)
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
with gr.Blocks(css = css) as demo:
|
54 |
gr.Markdown("""
|
55 |
## Multi-lingual Transcript Generator
|
|
|
50 |
path = yt.streams.filter(only_audio=True)[0].download(filename="audio.mp3")
|
51 |
return transcribe(path)
|
52 |
|
53 |
+
css = """
|
54 |
+
.gradio-container {
|
55 |
+
font-family: 'IBM Plex Sans', sans-serif;
|
56 |
+
}
|
57 |
+
.gr-button {
|
58 |
+
color: white;
|
59 |
+
border-color: black;
|
60 |
+
background: black;
|
61 |
+
}
|
62 |
+
input[type='range'] {
|
63 |
+
accent-color: black;
|
64 |
+
}
|
65 |
+
.dark input[type='range'] {
|
66 |
+
accent-color: #dfdfdf;
|
67 |
+
}
|
68 |
+
.container {
|
69 |
+
max-width: 880px;
|
70 |
+
margin: auto;
|
71 |
+
padding-top: 1.5rem;
|
72 |
+
}
|
73 |
+
#gallery {
|
74 |
+
min-height: 22rem;
|
75 |
+
margin-bottom: 15px;
|
76 |
+
margin-left: auto;
|
77 |
+
margin-right: auto;
|
78 |
+
border-bottom-right-radius: .5rem !important;
|
79 |
+
border-bottom-left-radius: .5rem !important;
|
80 |
+
}
|
81 |
+
#gallery>div>.h-full {
|
82 |
+
min-height: 20rem;
|
83 |
+
}
|
84 |
+
.details:hover {
|
85 |
+
text-decoration: underline;
|
86 |
+
}
|
87 |
+
.gr-button {
|
88 |
+
white-space: nowrap;
|
89 |
+
}
|
90 |
+
.gr-button:focus {
|
91 |
+
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
92 |
+
outline: none;
|
93 |
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
94 |
+
--tw-border-opacity: 1;
|
95 |
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
96 |
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
|
97 |
+
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
98 |
+
--tw-ring-opacity: .5;
|
99 |
+
}
|
100 |
+
#advanced-btn {
|
101 |
+
font-size: .7rem !important;
|
102 |
+
line-height: 19px;
|
103 |
+
margin-top: 12px;
|
104 |
+
margin-bottom: 12px;
|
105 |
+
padding: 2px 8px;
|
106 |
+
border-radius: 14px !important;
|
107 |
+
}
|
108 |
+
#advanced-options {
|
109 |
+
display: none;
|
110 |
+
margin-bottom: 20px;
|
111 |
+
}
|
112 |
+
.footer {
|
113 |
+
margin-bottom: 45px;
|
114 |
+
margin-top: 35px;
|
115 |
+
text-align: center;
|
116 |
+
border-bottom: 1px solid #e5e5e5;
|
117 |
+
}
|
118 |
+
.footer>p {
|
119 |
+
font-size: .8rem;
|
120 |
+
display: inline-block;
|
121 |
+
padding: 0 10px;
|
122 |
+
transform: translateY(10px);
|
123 |
+
background: white;
|
124 |
+
}
|
125 |
+
.dark .footer {
|
126 |
+
border-color: #303030;
|
127 |
+
}
|
128 |
+
.dark .footer>p {
|
129 |
+
background: #0b0f19;
|
130 |
+
}
|
131 |
+
"""
|
132 |
+
|
133 |
with gr.Blocks(css = css) as demo:
|
134 |
gr.Markdown("""
|
135 |
## Multi-lingual Transcript Generator
|