Spaces:
Sleeping
Sleeping
Commit
·
cb2237b
1
Parent(s):
ea9e4b8
updated markdown
Browse files- gradio_interface.py +3 -2
gradio_interface.py
CHANGED
|
@@ -12,7 +12,7 @@ def create_gradio_interface(process_and_generate):
|
|
| 12 |
def gradio_process_and_generate(input_image, prompt, num_images, cfg_weight):
|
| 13 |
return process_and_generate(input_image, prompt, num_images, cfg_weight)
|
| 14 |
|
| 15 |
-
explanation = """Janus 1.3B uses
|
| 16 |
|
| 17 |

|
| 18 |
|
|
@@ -25,6 +25,8 @@ Here, by feeding the model an image and then asking it to generate that same ima
|
|
| 25 |
with gr.Row():
|
| 26 |
input_image = gr.Image(type="filepath", label="Input Image")
|
| 27 |
output_images = gr.Gallery(label="Generated Images", columns=2, rows=2)
|
|
|
|
|
|
|
| 28 |
prompt = gr.Textbox(label="Prompt", value="Exactly what is shown in the image.")
|
| 29 |
num_images = gr.Slider(minimum=1, maximum=12, value=12, step=1, label="Number of Images to Generate")
|
| 30 |
cfg_weight = gr.Slider(minimum=1, maximum=10, value=5, step=0.1, label="CFG Weight")
|
|
@@ -40,6 +42,5 @@ Here, by feeding the model an image and then asking it to generate that same ima
|
|
| 40 |
inputs=[input_image, dummy]
|
| 41 |
)
|
| 42 |
|
| 43 |
-
gr.Markdown(explanation)
|
| 44 |
|
| 45 |
return demo
|
|
|
|
| 12 |
def gradio_process_and_generate(input_image, prompt, num_images, cfg_weight):
|
| 13 |
return process_and_generate(input_image, prompt, num_images, cfg_weight)
|
| 14 |
|
| 15 |
+
explanation = """[Janus 1.3B](https://huggingface.co/deepseek-ai/Janus-1.3B) uses differerent visual encoders for understanding and generation.
|
| 16 |
|
| 17 |

|
| 18 |
|
|
|
|
| 25 |
with gr.Row():
|
| 26 |
input_image = gr.Image(type="filepath", label="Input Image")
|
| 27 |
output_images = gr.Gallery(label="Generated Images", columns=2, rows=2)
|
| 28 |
+
|
| 29 |
+
gr.Markdown(explanation)
|
| 30 |
prompt = gr.Textbox(label="Prompt", value="Exactly what is shown in the image.")
|
| 31 |
num_images = gr.Slider(minimum=1, maximum=12, value=12, step=1, label="Number of Images to Generate")
|
| 32 |
cfg_weight = gr.Slider(minimum=1, maximum=10, value=5, step=0.1, label="CFG Weight")
|
|
|
|
| 42 |
inputs=[input_image, dummy]
|
| 43 |
)
|
| 44 |
|
|
|
|
| 45 |
|
| 46 |
return demo
|