davidlee831117 commited on
Commit
8a6dbe2
·
verified ·
1 Parent(s): 9969bf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -30
app.py CHANGED
@@ -86,37 +86,9 @@ def process_image_and_prompt(uploaded_files, prompt, gemini_api_key):
86
  # Build a Blocks-based interface with a custom HTML header and CSS
87
  with gr.Blocks() as demo:
88
  # Custom HTML header with proper class for styling
89
- gr.HTML(
90
- """
91
- <div class="header-container">
92
- <div>
93
- <img src="https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png" alt="Gemini logo">
94
- </div>
95
- <div>
96
- <h1>Gemini for Image Editing</h1>
97
- <p>Powered by <a href="https://gradio.app/">Gradio</a>⚡️| <a href="https://huggingface.co/spaces/ameerazam08/Gemini-Image-Edit?duplicate=true">Duplicate</a> this Repo | <a href="https://aistudio.google.com/apikey">Get an API Key</a> | Follow me on Twitter: <a href="https://x.com/Ameerazam18">Ameerazam18</a></p>
98
- </div>
99
- </div>
100
- """
101
- )
102
 
103
- with gr.Accordion("⚠️ API Configuration ⚠️", open=False, elem_classes="config-accordion"):
104
- gr.Markdown("""
105
- - **Issue:** ❗ Sometimes the model returns text instead of an image.
106
- ### 🔧 Steps to Address:
107
- 1. **🛠️ Duplicate the Repository**
108
- - Create a separate copy for modifications.
109
- 2. **🔑 Use Your Own Gemini API Key**
110
- - You **must** configure your own Gemini key for generation!
111
- """)
112
- with gr.Accordion("📌 Usage Instructions", open=False, elem_classes="instructions-accordion"):
113
- gr.Markdown("""
114
- ### 📌 Usage
115
- - Upload an image and enter a prompt to generate outputs.
116
- - If text is returned instead of an image, it will appear in the text output.
117
- - Upload Only PNG Image
118
- - ❌ **Do not use NSFW images!**
119
- """)
120
  with gr.Row(elem_classes="main-content"):
121
  with gr.Column(elem_classes="input-column"):
122
  image_input = gr.File(
 
86
  # Build a Blocks-based interface with a custom HTML header and CSS
87
  with gr.Blocks() as demo:
88
  # Custom HTML header with proper class for styling
89
+
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  with gr.Row(elem_classes="main-content"):
93
  with gr.Column(elem_classes="input-column"):
94
  image_input = gr.File(