Spaces:
Running
Running
add static path
Browse files- myapp/app.py +4 -1
- {myapp → static}/example.webp +0 -0
myapp/app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import re
|
2 |
from functools import partial
|
3 |
from io import BytesIO
|
|
|
4 |
from typing import Any
|
5 |
|
6 |
import gradio as gr
|
@@ -24,6 +25,8 @@ MODELS = [
|
|
24 |
"black-forest-labs/FLUX.1-schnell",
|
25 |
]
|
26 |
|
|
|
|
|
27 |
with gr.Blocks() as demo:
|
28 |
with gr.Row():
|
29 |
with gr.Column():
|
@@ -36,7 +39,7 @@ with gr.Blocks() as demo:
|
|
36 |
|
37 |
with gr.Column():
|
38 |
output = gr.Image()
|
39 |
-
background = gr.Image("example.webp", visible=False, type="filepath")
|
40 |
scale = gr.Slider(3, 15, 9, step=1, label="Scale")
|
41 |
|
42 |
with gr.Row():
|
|
|
1 |
import re
|
2 |
from functools import partial
|
3 |
from io import BytesIO
|
4 |
+
from pathlib import Path
|
5 |
from typing import Any
|
6 |
|
7 |
import gradio as gr
|
|
|
25 |
"black-forest-labs/FLUX.1-schnell",
|
26 |
]
|
27 |
|
28 |
+
gr.set_static_paths("static")
|
29 |
+
|
30 |
with gr.Blocks() as demo:
|
31 |
with gr.Row():
|
32 |
with gr.Column():
|
|
|
39 |
|
40 |
with gr.Column():
|
41 |
output = gr.Image()
|
42 |
+
background = gr.Image("static/example.webp", visible=False, type="filepath")
|
43 |
scale = gr.Slider(3, 15, 9, step=1, label="Scale")
|
44 |
|
45 |
with gr.Row():
|
{myapp → static}/example.webp
RENAMED
File without changes
|