Update app.py
Browse files
app.py
CHANGED
@@ -98,21 +98,10 @@ body::before {
|
|
98 |
}
|
99 |
"""
|
100 |
|
101 |
-
# JavaScript for text-to-speech
|
102 |
custom_js = """
|
103 |
<script>
|
104 |
document.addEventListener('DOMContentLoaded', function () {
|
105 |
-
// Add particles
|
106 |
-
const particlesContainer = document.createElement('div');
|
107 |
-
particlesContainer.classList.add('particles');
|
108 |
-
for (let i = 0; i < 5; i++) {
|
109 |
-
const particle = document.createElement('div');
|
110 |
-
particle.classList.add('particle');
|
111 |
-
particlesContainer.appendChild(particle);
|
112 |
-
}
|
113 |
-
document.body.appendChild(particlesContainer);
|
114 |
-
|
115 |
-
// Text-to-speech functionality
|
116 |
function speak(text) {
|
117 |
const synth = window.speechSynthesis;
|
118 |
const utterance = new SpeechSynthesisUtterance(text);
|
@@ -130,15 +119,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
130 |
|
131 |
# Gallery Images with captions
|
132 |
gallery_images = [
|
133 |
-
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/387f5407e32dd2e2d9e7017977f5ee98e4f40dcb8b1d2a9ef23612255a675163/image.webp
|
134 |
-
", "Red Color, iPhone 14,
|
135 |
-
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/
|
136 |
-
", "Red Color, iPhone 14, Darth Vader Theme"),
|
137 |
-
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/1958c8d60219357edbb2e1f69331152f1cd1109407b274c4511a810650dd574b/image.webp
|
138 |
-
", "Black, iPhone 15, Thomas Shelby(Peaky Blinders) Theme"),
|
139 |
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/183392add00a7fa3d53653f856bc88d4113bd74c0d37c43de7a9af414e9c1d84/image.webp", "Green color, iPhone, Green Goblin"),
|
140 |
-
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/b7b0b2415f15f810f71658616a885b97c0466d09f1d852684a868ab9b5d18e6c/image.webp
|
141 |
-
", "White and Cream Color, iPhone 15, Iron-Man"),
|
142 |
]
|
143 |
|
144 |
# Gradio interface
|
@@ -198,4 +183,4 @@ with gr.Blocks(css=custom_css) as interface:
|
|
198 |
""")
|
199 |
|
200 |
# Launch the app
|
201 |
-
interface.launch(debug=True)
|
|
|
98 |
}
|
99 |
"""
|
100 |
|
101 |
+
# JavaScript for text-to-speech
|
102 |
custom_js = """
|
103 |
<script>
|
104 |
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
function speak(text) {
|
106 |
const synth = window.speechSynthesis;
|
107 |
const utterance = new SpeechSynthesisUtterance(text);
|
|
|
119 |
|
120 |
# Gallery Images with captions
|
121 |
gallery_images = [
|
122 |
+
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/387f5407e32dd2e2d9e7017977f5ee98e4f40dcb8b1d2a9ef23612255a675163/image.webp", "Red Color, iPhone 14, Naruto Anime Theme"),
|
123 |
+
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/3037d9cae7a86b29be5969cf3a361ae847915b54d97d6d5dffb6e019a2b9ddc9/image.webp", "Red Color, iPhone 14, Darth Vader Theme"),
|
124 |
+
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/1958c8d60219357edbb2e1f69331152f1cd1109407b274c4511a810650dd574b/image.webp", "Black, iPhone 15, Thomas Shelby (Peaky Blinders) Theme"),
|
|
|
|
|
|
|
125 |
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/183392add00a7fa3d53653f856bc88d4113bd74c0d37c43de7a9af414e9c1d84/image.webp", "Green color, iPhone, Green Goblin"),
|
126 |
+
("https://gaur3009-phone-c.hf.space/gradio_api/file=/tmp/gradio/b7b0b2415f15f810f71658616a885b97c0466d09f1d852684a868ab9b5d18e6c/image.webp", "White and Cream Color, iPhone 15, Iron-Man"),
|
|
|
127 |
]
|
128 |
|
129 |
# Gradio interface
|
|
|
183 |
""")
|
184 |
|
185 |
# Launch the app
|
186 |
+
interface.launch(debug=True)
|