Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ It is recommended to upgrade to GPU in Settings after duplicating this space to
|
|
47 |
<a href="https://huggingface.co/spaces/Ziqi/ReVersion?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
48 |
'''
|
49 |
DETAILDESCRIPTION='''
|
50 |
-
ReVersion
|
51 |
'''
|
52 |
# DETAILDESCRIPTION='''
|
53 |
# Custom Diffusion allows you to fine-tune text-to-image diffusion models, such as Stable Diffusion, given a few images of a new concept (~4-20).
|
@@ -75,8 +75,8 @@ You can assign a GPU in the {SETTINGS} tab if you are running this on HF Spaces.
|
|
75 |
</center>
|
76 |
'''
|
77 |
|
78 |
-
os.system("git clone https://github.com/ziqihuangg/ReVersion")
|
79 |
-
sys.path.append("ReVersion")
|
80 |
|
81 |
def show_warning(warning_text: str) -> gr.Blocks:
|
82 |
with gr.Blocks() as demo:
|
@@ -126,7 +126,7 @@ def create_inference_demo(func: inference_fn) -> gr.Blocks:
|
|
126 |
maximum=50,
|
127 |
step=0.1,
|
128 |
value=7.5)
|
129 |
-
num_samples = gr.Slider(label='
|
130 |
minimum=0,
|
131 |
maximum=10.,
|
132 |
step=1,
|
@@ -181,7 +181,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
181 |
gr.Markdown(DETAILDESCRIPTION)
|
182 |
|
183 |
with gr.Tabs():
|
184 |
-
with gr.TabItem('
|
185 |
create_inference_demo(inference_fn)
|
186 |
|
187 |
demo.launch(
|
|
|
47 |
<a href="https://huggingface.co/spaces/Ziqi/ReVersion?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
48 |
'''
|
49 |
DETAILDESCRIPTION='''
|
50 |
+
ReVersion: <R> represents the learned text token for a relation. Use <R> in your prompt for relation-specific generation.
|
51 |
'''
|
52 |
# DETAILDESCRIPTION='''
|
53 |
# Custom Diffusion allows you to fine-tune text-to-image diffusion models, such as Stable Diffusion, given a few images of a new concept (~4-20).
|
|
|
75 |
</center>
|
76 |
'''
|
77 |
|
78 |
+
# os.system("git clone https://github.com/ziqihuangg/ReVersion")
|
79 |
+
# sys.path.append("ReVersion")
|
80 |
|
81 |
def show_warning(warning_text: str) -> gr.Blocks:
|
82 |
with gr.Blocks() as demo:
|
|
|
126 |
maximum=50,
|
127 |
step=0.1,
|
128 |
value=7.5)
|
129 |
+
num_samples = gr.Slider(label='Number of Images to Generate',
|
130 |
minimum=0,
|
131 |
maximum=10.,
|
132 |
step=1,
|
|
|
181 |
gr.Markdown(DETAILDESCRIPTION)
|
182 |
|
183 |
with gr.Tabs():
|
184 |
+
with gr.TabItem('Relation-Specific Text-to-Image Generation'):
|
185 |
create_inference_demo(inference_fn)
|
186 |
|
187 |
demo.launch(
|