Spaces:
Runtime error
Runtime error
gradio
Browse files
app.py
CHANGED
|
@@ -1,12 +1,7 @@
|
|
| 1 |
-
import subprocess
|
| 2 |
-
|
| 3 |
-
# 执行shell命令
|
| 4 |
-
command = "pip install gradio==3.47"
|
| 5 |
-
result = subprocess.run(command, shell=True, capture_output=True, text=True)
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
import os
|
|
|
|
|
|
|
|
|
|
| 10 |
import json
|
| 11 |
import re
|
| 12 |
from turtle import width
|
|
@@ -508,8 +503,8 @@ def ui():
|
|
| 508 |
style_mask = gr.Image(label="Style Mask", elem_id="img2maskimg", source="upload", interactive=True, type="numpy", image_mode="RGB", height=256)
|
| 509 |
|
| 510 |
gr.Examples(
|
| 511 |
-
[[os.path.join(os.path.dirname(__file__), "
|
| 512 |
-
os.path.join(os.path.dirname(__file__), "
|
| 513 |
|
| 514 |
],
|
| 515 |
[source_image, style_image]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
+
os.system("pip uninstall -y gradio")
|
| 3 |
+
os.system("pip install gradio==3.47")
|
| 4 |
+
|
| 5 |
import json
|
| 6 |
import re
|
| 7 |
from turtle import width
|
|
|
|
| 503 |
style_mask = gr.Image(label="Style Mask", elem_id="img2maskimg", source="upload", interactive=True, type="numpy", image_mode="RGB", height=256)
|
| 504 |
|
| 505 |
gr.Examples(
|
| 506 |
+
[[os.path.join(os.path.dirname(__file__), "images/content/1.jpg"),
|
| 507 |
+
os.path.join(os.path.dirname(__file__), "images/style/1.jpg")],
|
| 508 |
|
| 509 |
],
|
| 510 |
[source_image, style_image]
|