Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -296,29 +296,6 @@ def generate(
|
|
296 |
output_file = asyncio.run(text_to_speech(final_response, voice))
|
297 |
yield gr.Audio(output_file, autoplay=True)
|
298 |
|
299 |
-
# ------------------------------
|
300 |
-
# Sample Examples
|
301 |
-
# ------------------------------
|
302 |
-
|
303 |
-
# Each example is now a dictionary with "text" and an empty "files" list.
|
304 |
-
examples = [
|
305 |
-
{"text": "Python Program for Array Rotation", "files": []},
|
306 |
-
{"text": "@tts1 Who is Nikola Tesla, and why did he die?", "files": []},
|
307 |
-
{"text": "@realism A futuristic cityscape with neon lights", "files": []},
|
308 |
-
{"text": "@pixar A whimsical scene featuring a playful robot in a vibrant setting", "files": []},
|
309 |
-
{"text": "@photoshoot A portrait of a person with dramatic lighting", "files": []},
|
310 |
-
{"text": "@clothing Fashionable streetwear in an urban environment", "files": []},
|
311 |
-
{"text": "@interior A modern living room interior with minimalist design", "files": []},
|
312 |
-
{"text": "@fashion A runway model in haute couture", "files": []},
|
313 |
-
{"text": "@minimalistic A simple and elegant design of a serene landscape", "files": []},
|
314 |
-
{"text": "@modern A contemporary art piece with abstract geometric shapes", "files": []},
|
315 |
-
{"text": "@animaliea A cute animal portrait with vibrant colors", "files": []},
|
316 |
-
{"text": "@wallpaper A scenic mountain range perfect for a desktop wallpaper", "files": []},
|
317 |
-
{"text": "@cars A sleek sports car cruising on a city street", "files": []},
|
318 |
-
{"text": "@pencilart A detailed pencil sketch of a historic building", "files": []},
|
319 |
-
{"text": "@artminimalistic An artistic minimalist composition with subtle tones", "files": []},
|
320 |
-
{"text": "@tts2 What causes rainbows to form?", "files": []},
|
321 |
-
]
|
322 |
|
323 |
demo = gr.ChatInterface(
|
324 |
fn=generate,
|
@@ -329,7 +306,24 @@ demo = gr.ChatInterface(
|
|
329 |
gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50),
|
330 |
gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
|
331 |
],
|
332 |
-
examples=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
cache_examples=False,
|
334 |
type="messages",
|
335 |
description=DESCRIPTION,
|
@@ -342,4 +336,4 @@ demo = gr.ChatInterface(
|
|
342 |
|
343 |
if __name__ == "__main__":
|
344 |
# To create a public link, set share=True in launch().
|
345 |
-
demo.queue(max_size=20).launch(share=True)
|
|
|
296 |
output_file = asyncio.run(text_to_speech(final_response, voice))
|
297 |
yield gr.Audio(output_file, autoplay=True)
|
298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
demo = gr.ChatInterface(
|
301 |
fn=generate,
|
|
|
306 |
gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50),
|
307 |
gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
|
308 |
],
|
309 |
+
examples = [
|
310 |
+
["Python Program for Array Rotation"],
|
311 |
+
["@tts1 Who is Nikola Tesla, and why did he die?"],
|
312 |
+
["@realism A futuristic cityscape with neon lights"],
|
313 |
+
["@pixar A whimsical scene featuring a playful robot in a vibrant setting"],
|
314 |
+
["@photoshoot A portrait of a person with dramatic lighting"],
|
315 |
+
["@clothing Fashionable streetwear in an urban environment"],
|
316 |
+
["@interior A modern living room interior with minimalist design"],
|
317 |
+
["@fashion A runway model in haute couture"],
|
318 |
+
["@minimalistic A simple and elegant design of a serene landscape"],
|
319 |
+
["@modern A contemporary art piece with abstract geometric shapes"],
|
320 |
+
["@animaliea A cute animal portrait with vibrant colors"],
|
321 |
+
["@wallpaper A scenic mountain range perfect for a desktop wallpaper"],
|
322 |
+
["@cars A sleek sports car cruising on a city street"],
|
323 |
+
["@pencilart A detailed pencil sketch of a historic building"],
|
324 |
+
["@artminimalistic An artistic minimalist composition with subtle tones"],
|
325 |
+
["@tts2 What causes rainbows to form?"],
|
326 |
+
],
|
327 |
cache_examples=False,
|
328 |
type="messages",
|
329 |
description=DESCRIPTION,
|
|
|
336 |
|
337 |
if __name__ == "__main__":
|
338 |
# To create a public link, set share=True in launch().
|
339 |
+
demo.queue(max_size=20).launch(share=True)
|