Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,18 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from PIL import Image
|
| 3 |
|
| 4 |
+
def edit_image(image, prompt):run,woman,thai,dance
|
| 5 |
+
# ใส่ logic แก้ไขภาพตาม prompt เช่น เปลี่ยนสีตาเป็นเขียว
|
| 6 |
+
return image # หรือภาพที่แก้แล้ว
|
| 7 |
+
|
| 8 |
+
demo = gr.Interface(
|
| 9 |
+
fn=edit_image,
|
| 10 |
+
inputs=[
|
| 11 |
+
gr.Image(type="pil", label="Input Image"),
|
| 12 |
+
gr.Textbox(label="Prompt (e.g. 'make eyes green')")
|
| 13 |
+
],
|
| 14 |
+
outputs="image",
|
| 15 |
+
title="Qwen Image Edit"
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
demo.launch()
|