Spaces:
Sleeping
Sleeping
Update text2image.py
#1
by
kuyee
- opened
- text2image.py +2 -2
text2image.py
CHANGED
|
@@ -12,7 +12,7 @@ def explain_image(image: Image.Image):
|
|
| 12 |
# η΄ζ₯ζ PIL image ε³ι²ε»
|
| 13 |
response = client.models.generate_content(
|
| 14 |
model="gemini-2.0-flash",
|
| 15 |
-
contents=[image, "
|
| 16 |
)
|
| 17 |
# εεΊεη
|
| 18 |
explanation = response.text
|
|
@@ -20,7 +20,7 @@ def explain_image(image: Image.Image):
|
|
| 20 |
|
| 21 |
# Gradio δ»ι’
|
| 22 |
with gr.Blocks() as demo:
|
| 23 |
-
gr.Markdown("## π§ (
|
| 24 |
image_input = gr.Image(type="pil", label="δΈε³εη")
|
| 25 |
explain_button = gr.Button("θ§£ιεη")
|
| 26 |
output_text = gr.Textbox(label="εηθͺͺζ", lines=5)
|
|
|
|
| 12 |
# η΄ζ₯ζ PIL image ε³ι²ε»
|
| 13 |
response = client.models.generate_content(
|
| 14 |
model="gemini-2.0-flash",
|
| 15 |
+
contents=[image, "δ½Ώη¨ζ³θͺζθΏ°ιεΌ΅εη"],
|
| 16 |
)
|
| 17 |
# εεΊεη
|
| 18 |
explanation = response.text
|
|
|
|
| 20 |
|
| 21 |
# Gradio δ»ι’
|
| 22 |
with gr.Blocks() as demo:
|
| 23 |
+
gr.Markdown("## π§ (B11090070)Gemini εηθ§£ιε¨οΌε β ζοΌ")
|
| 24 |
image_input = gr.Image(type="pil", label="δΈε³εη")
|
| 25 |
explain_button = gr.Button("θ§£ιεη")
|
| 26 |
output_text = gr.Textbox(label="εηθͺͺζ", lines=5)
|