Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,58 @@ async def create_demo():
|
|
59 |
You can enter any text and select the voice you want to use.
|
60 |
Adjust the speech rate and pitch according to your preference.
|
61 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
demo = gr.Interface(
|
64 |
fn=tts_interface,
|
@@ -76,11 +128,12 @@ async def create_demo():
|
|
76 |
description=description,
|
77 |
article="",
|
78 |
analytics_enabled=False,
|
79 |
-
allow_flagging="manual"
|
|
|
80 |
)
|
81 |
return demo
|
82 |
|
83 |
# Run the application
|
84 |
if __name__ == "__main__":
|
85 |
demo = asyncio.run(create_demo())
|
86 |
-
demo.launch()
|
|
|
59 |
You can enter any text and select the voice you want to use.
|
60 |
Adjust the speech rate and pitch according to your preference.
|
61 |
"""
|
62 |
+
|
63 |
+
custom_css = """
|
64 |
+
body {
|
65 |
+
background: linear-gradient(45deg, #FF5733, #DD2C00);
|
66 |
+
color: white;
|
67 |
+
font-family: 'Arial', sans-serif;
|
68 |
+
transition: background 1s ease-in-out;
|
69 |
+
}
|
70 |
+
.gr-button {
|
71 |
+
background: linear-gradient(45deg, #FF5733, #DD2C00);
|
72 |
+
border: none;
|
73 |
+
color: white;
|
74 |
+
padding: 10px 20px;
|
75 |
+
margin: 10px;
|
76 |
+
border-radius: 5px;
|
77 |
+
cursor: pointer;
|
78 |
+
transition: background 0.3s ease-in-out;
|
79 |
+
}
|
80 |
+
.gr-button:hover {
|
81 |
+
background: linear-gradient(45deg, #DD2C00, #FF5733);
|
82 |
+
}
|
83 |
+
.gr-input {
|
84 |
+
background: rgba(255, 87, 51, 0.2);
|
85 |
+
border: 1px solid #FF5733;
|
86 |
+
border-radius: 5px;
|
87 |
+
padding: 10px;
|
88 |
+
transition: background 0.3s ease-in-out;
|
89 |
+
}
|
90 |
+
.gr-input:focus {
|
91 |
+
background: rgba(255, 87, 51, 0.4);
|
92 |
+
}
|
93 |
+
.gr-slider {
|
94 |
+
background: rgba(255, 87, 51, 0.2);
|
95 |
+
border: 1px solid #FF5733;
|
96 |
+
border-radius: 5px;
|
97 |
+
padding: 10px;
|
98 |
+
transition: background 0.3s ease-in-out;
|
99 |
+
}
|
100 |
+
.gr-slider:hover {
|
101 |
+
background: rgba(255, 87, 51, 0.4);
|
102 |
+
}
|
103 |
+
.gr-dropdown {
|
104 |
+
background: rgba(255, 87, 51, 0.2);
|
105 |
+
border: 1px solid #FF5733;
|
106 |
+
border-radius: 5px;
|
107 |
+
padding: 10px;
|
108 |
+
transition: background 0.3s ease-in-out;
|
109 |
+
}
|
110 |
+
.gr-dropdown:hover {
|
111 |
+
background: rgba(255, 87, 51, 0.4);
|
112 |
+
}
|
113 |
+
"""
|
114 |
|
115 |
demo = gr.Interface(
|
116 |
fn=tts_interface,
|
|
|
128 |
description=description,
|
129 |
article="",
|
130 |
analytics_enabled=False,
|
131 |
+
allow_flagging="manual",
|
132 |
+
css=custom_css
|
133 |
)
|
134 |
return demo
|
135 |
|
136 |
# Run the application
|
137 |
if __name__ == "__main__":
|
138 |
demo = asyncio.run(create_demo())
|
139 |
+
demo.launch()
|