Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -405,27 +405,6 @@ def generate(
|
|
| 405 |
output_file = asyncio.run(text_to_speech(final_response, voice))
|
| 406 |
yield gr.Audio(output_file, autoplay=True)
|
| 407 |
|
| 408 |
-
# -----------------------
|
| 409 |
-
# GRADIO INTERFACE
|
| 410 |
-
# -----------------------
|
| 411 |
-
DESCRIPTION = """
|
| 412 |
-
# IMAGINEO CHAT ⚡
|
| 413 |
-
"""
|
| 414 |
-
|
| 415 |
-
css = '''
|
| 416 |
-
h1 {
|
| 417 |
-
text-align: center;
|
| 418 |
-
display: block;
|
| 419 |
-
}
|
| 420 |
-
|
| 421 |
-
#duplicate-button {
|
| 422 |
-
margin: auto;
|
| 423 |
-
color: #fff;
|
| 424 |
-
background: #1565c0;
|
| 425 |
-
border-radius: 100vh;
|
| 426 |
-
}
|
| 427 |
-
'''
|
| 428 |
-
|
| 429 |
demo = gr.ChatInterface(
|
| 430 |
fn=generate,
|
| 431 |
additional_inputs=[
|
|
@@ -436,6 +415,8 @@ demo = gr.ChatInterface(
|
|
| 436 |
gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
|
| 437 |
],
|
| 438 |
examples=[
|
|
|
|
|
|
|
| 439 |
['@lightningv5 Chocolate dripping from a donut against a yellow background, in the style of brocore, hyper-realistic'],
|
| 440 |
["Python Program for Array Rotation"],
|
| 441 |
["@tts1 Who is Nikola Tesla, and why did he die?"],
|
|
@@ -445,10 +426,9 @@ demo = gr.ChatInterface(
|
|
| 445 |
],
|
| 446 |
cache_examples=False,
|
| 447 |
type="messages",
|
| 448 |
-
description=
|
| 449 |
-
css=css,
|
| 450 |
fill_height=True,
|
| 451 |
-
textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple", placeholder="use the tags @lightningv5 @lightningv4 @turbov3
|
| 452 |
stop_btn="Stop Generation",
|
| 453 |
multimodal=True,
|
| 454 |
)
|
|
|
|
| 405 |
output_file = asyncio.run(text_to_speech(final_response, voice))
|
| 406 |
yield gr.Audio(output_file, autoplay=True)
|
| 407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
demo = gr.ChatInterface(
|
| 409 |
fn=generate,
|
| 410 |
additional_inputs=[
|
|
|
|
| 415 |
gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
|
| 416 |
],
|
| 417 |
examples=[
|
| 418 |
+
[{"text": "@gemma3-4b Explain the Image", "files": ["examples/3.jpg"]}],
|
| 419 |
+
[{"text": "@gemma3-4b Extract as JSON table from the table", "files": ["examples/4.jpg"]}],
|
| 420 |
['@lightningv5 Chocolate dripping from a donut against a yellow background, in the style of brocore, hyper-realistic'],
|
| 421 |
["Python Program for Array Rotation"],
|
| 422 |
["@tts1 Who is Nikola Tesla, and why did he die?"],
|
|
|
|
| 426 |
],
|
| 427 |
cache_examples=False,
|
| 428 |
type="messages",
|
| 429 |
+
description="# **Imagineo Chat `@gemma3-4b 'prompt..', @lightningv5, etc..`**",
|
|
|
|
| 430 |
fill_height=True,
|
| 431 |
+
textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple", placeholder="use the tags @gemma3-4b for multimodal, @lightningv5, @lightningv4 @turbov3 for image gen !"),
|
| 432 |
stop_btn="Stop Generation",
|
| 433 |
multimodal=True,
|
| 434 |
)
|