Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,10 +34,8 @@ def process_youtube_or_audio(url, recorded_audio):
|
|
34 |
if not filename or not os.path.exists(filename):
|
35 |
return None, None
|
36 |
|
37 |
-
|
38 |
audio = AudioSegment.from_file(filename)
|
39 |
|
40 |
-
|
41 |
if len(audio) > 20000:
|
42 |
audio = audio[:20000]
|
43 |
|
@@ -62,7 +60,7 @@ def process_youtube_or_audio(url, recorded_audio):
|
|
62 |
with gr.Blocks(css="""
|
63 |
body { font-family: Arial, sans-serif; text-align: center; }
|
64 |
.light-btn {
|
65 |
-
background-color: #ADD8E6;
|
66 |
color: #333;
|
67 |
border: 2px solid #ccc;
|
68 |
padding: 10px 20px;
|
@@ -70,9 +68,10 @@ with gr.Blocks(css="""
|
|
70 |
cursor: pointer;
|
71 |
}
|
72 |
.light-btn:hover {
|
73 |
-
background-color: #87CEFA;
|
74 |
}
|
75 |
""") as interface:
|
|
|
76 |
gr.HTML("""
|
77 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
78 |
<h1><i class="fa fa-music"></i> PYTRR</h1>
|
@@ -104,3 +103,4 @@ with gr.Blocks(css="""
|
|
104 |
|
105 |
interface.launch(share=True)
|
106 |
|
|
|
|
34 |
if not filename or not os.path.exists(filename):
|
35 |
return None, None
|
36 |
|
|
|
37 |
audio = AudioSegment.from_file(filename)
|
38 |
|
|
|
39 |
if len(audio) > 20000:
|
40 |
audio = audio[:20000]
|
41 |
|
|
|
60 |
with gr.Blocks(css="""
|
61 |
body { font-family: Arial, sans-serif; text-align: center; }
|
62 |
.light-btn {
|
63 |
+
background-color: #ADD8E6;
|
64 |
color: #333;
|
65 |
border: 2px solid #ccc;
|
66 |
padding: 10px 20px;
|
|
|
68 |
cursor: pointer;
|
69 |
}
|
70 |
.light-btn:hover {
|
71 |
+
background-color: #87CEFA;
|
72 |
}
|
73 |
""") as interface:
|
74 |
+
|
75 |
gr.HTML("""
|
76 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
77 |
<h1><i class="fa fa-music"></i> PYTRR</h1>
|
|
|
103 |
|
104 |
interface.launch(share=True)
|
105 |
|
106 |
+
|