Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,19 +12,33 @@ with gr.Blocks(theme = 'NoCrypt/miku') as demo:
|
|
| 12 |
img = Image.open('img/bg.png')
|
| 13 |
return img
|
| 14 |
|
| 15 |
-
with gr.
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
genebutton.click(
|
| 30 |
fn = func,
|
|
@@ -32,4 +46,4 @@ with gr.Blocks(theme = 'NoCrypt/miku') as demo:
|
|
| 32 |
outputs = outputimage
|
| 33 |
)
|
| 34 |
|
| 35 |
-
demo.launch()
|
|
|
|
| 12 |
img = Image.open('img/bg.png')
|
| 13 |
return img
|
| 14 |
|
| 15 |
+
with gr.Column():
|
| 16 |
+
introtext1 = gr.Markdown( # 在此输入描述,使用 Markdown
|
| 17 |
+
"""
|
| 18 |
+
这里是描述性文字。
|
| 19 |
+
测试 Markdown。
|
| 20 |
+
[超链接测试](https://venusnero.github.io)
|
| 21 |
+
**加粗**,*斜体*,`代码行`
|
| 22 |
+
```
|
| 23 |
+
代码块
|
| 24 |
+
```
|
| 25 |
+
"""
|
| 26 |
+
)
|
| 27 |
+
with gr.Row():
|
| 28 |
+
with gr.Column():
|
| 29 |
+
textinfo = gr.Textbox(label = "输入文字")
|
| 30 |
+
with gr.Row():
|
| 31 |
+
inputimage = gr.Image(label = "输入图片")
|
| 32 |
+
with gr.Column():
|
| 33 |
+
para1 = gr.Slider(label = "参数 1")
|
| 34 |
+
para2 = gr.Slider(label = "参数 2")
|
| 35 |
+
para3 = gr.Slider(label = "参数 3")
|
| 36 |
+
para4 = gr.Slider(label = "参数 4")
|
| 37 |
+
genebutton = gr.Button("生成")
|
| 38 |
+
with gr.Column():
|
| 39 |
+
outputimage = gr.Image(label = "输出图片")
|
| 40 |
+
introtext2 = gr.Image(label = "演示图片", value = "img/bg.png") # 在此修改描述图片路径
|
| 41 |
+
|
| 42 |
|
| 43 |
genebutton.click(
|
| 44 |
fn = func,
|
|
|
|
| 46 |
outputs = outputimage
|
| 47 |
)
|
| 48 |
|
| 49 |
+
demo.launch(allowed_paths=['./'])
|