Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import AutoConfig, AutoModelForCausalLM
|
|
4 |
from janus.models import MultiModalityCausalLM, VLChatProcessor
|
5 |
from PIL import Image
|
6 |
import numpy as np
|
7 |
-
import spaces #
|
8 |
|
9 |
# Load the model and processor
|
10 |
model_path = "deepseek-ai/Janus-Pro-7B"
|
@@ -99,7 +99,18 @@ def generate_image(prompt, seed=None, guidance=5, t2i_temperature=1.0):
|
|
99 |
# Gradio interface
|
100 |
def create_interface():
|
101 |
with gr.Blocks() as demo:
|
102 |
-
gr.Markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
prompt_input = gr.Textbox(label="Prompt (describe the image)")
|
105 |
seed_input = gr.Number(label="Seed (Optional)", value=12345, precision=0)
|
|
|
4 |
from janus.models import MultiModalityCausalLM, VLChatProcessor
|
5 |
from PIL import Image
|
6 |
import numpy as np
|
7 |
+
import spaces # Import spaces for ZeroGPU compatibility
|
8 |
|
9 |
# Load the model and processor
|
10 |
model_path = "deepseek-ai/Janus-Pro-7B"
|
|
|
99 |
# Gradio interface
|
100 |
def create_interface():
|
101 |
with gr.Blocks() as demo:
|
102 |
+
gr.Markdown("""
|
103 |
+
# Text-to-Image Generation with Janus-Pro-7B
|
104 |
+
|
105 |
+
Welcome to the Janus-Pro-7B Text-to-Image Generator! This advanced AI model by DeepSeek offers state-of-the-art capabilities in generating images from textual descriptions. Leveraging a unified multimodal framework, Janus-Pro-7B excels in both understanding and generating content, providing detailed and accurate visual representations based on your prompts.
|
106 |
+
|
107 |
+
**Key Features:**
|
108 |
+
- **Unified Multimodal Framework:** Integrates visual encoding and language processing for seamless understanding and generation.
|
109 |
+
- **High-Quality Image Generation:** Produces stable and detailed images that often surpass those from other leading models.
|
110 |
+
- **Flexible and Efficient:** Designed for a wide range of applications, from creative image generation to detailed visualizations.
|
111 |
+
|
112 |
+
For more information about Janus-Pro-7B, visit the [official Hugging Face model page](https://huggingface.co/deepseek-ai/Janus-Pro-7B).
|
113 |
+
""")
|
114 |
|
115 |
prompt_input = gr.Textbox(label="Prompt (describe the image)")
|
116 |
seed_input = gr.Number(label="Seed (Optional)", value=12345, precision=0)
|