Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files295 unmodified lines2962972982993003013023033043053063073083093103113123133143153163173183193203212993003014 unmodified lines3063073083323093103113123133143153163173183193203213223233243253263273283296 unmodified lines336337338345339295 unmodified lines output_file = asyncio.run(text_to_speech(final_response, voice)) yield gr.Audio(output_file, autoplay=True)
# ------------------------------# Sample Examples# ------------------------------
# Each example is now a dictionary with "text" and an empty "files" list.examples = [ {"text": "Python Program for Array Rotation", "files": []}, {"text": "@tts1 Who is Nikola Tesla, and why did he die?", "files": []}, {"text": "@realism A futuristic cityscape with neon lights", "files": []}, {"text": "@pixar A whimsical scene featuring a playful robot in a vibrant setting", "files": []}, {"text": "@photoshoot A portrait of a person with dramatic lighting", "files": []}, {"text": "@clothing Fashionable streetwear in an urban environment", "files": []}, {"text": "@interior A modern living room interior with minimalist design", "files": []}, {"text": "@fashion A runway model in haute couture", "files": []}, {"text": "@minimalistic A simple and elegant design of a serene landscape", "files": []}, {"text": "@modern A contemporary art piece with abstract geometric shapes", "files": []}, {"text": "@animaliea A cute animal portrait with vibrant colors", "files": []}, {"text": "@wallpaper A scenic mountain range perfect for a desktop wallpaper", "files": []}, {"text": "@cars A sleek sports car cruising on a city street", "files": []}, {"text": "@pencilart A detailed pencil sketch of a historic building", "files": []}, {"text": "@artminimalistic An artistic minimalist composition with subtle tones", "files": []}, {"text": "@tts2 What causes rainbows to form?", "files": []},]
demo = gr.ChatInterface( fn=generate,4 unmodified lines gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50), gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2), ], examples=examples, examples = [ ["Python Program for Array Rotation"], ["@tts1 Who is Nikola Tesla, and why did he die?"], ["@realism A futuristic cityscape with neon lights"], ["@pixar A whimsical scene featuring a playful robot in a vibrant setting"], ["@photoshoot A portrait of a person with dramatic lighting"], ["@clothing Fashionable streetwear in an urban environment"], ["@interior A modern living room interior with minimalist design"], ["@fashion A runway model in haute couture"], ["@minimalistic A simple and elegant design of a serene landscape"], ["@modern A contemporary art piece with abstract geometric shapes"], ["@animaliea A cute animal portrait with vibrant colors"], ["@wallpaper A scenic mountain range perfect for a desktop wallpaper"], ["@cars A sleek sports car cruising on a city street"], ["@pencilart A detailed pencil sketch of a historic building"], ["@artminimalistic An artistic minimalist composition with subtle tones"], ["@tts2 What causes rainbows to form?"], ], cache_examples=False, type="messages", description=DESCRIPTION,6 unmodified lines
if __name__ == "__main__": # To create a public link, set share=True in launch(). demo.queue(max_size=20).launch(share=True) demo.queue(max_size=20).launch(share=True)app.py+19-25