Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -112,6 +112,10 @@ def infer(prompt,prompt2):
|
|
| 112 |
return name
|
| 113 |
|
| 114 |
css="""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
footer {
|
| 116 |
display: none !important;
|
| 117 |
}
|
|
@@ -135,33 +139,33 @@ function custom(){
|
|
| 135 |
"""
|
| 136 |
|
| 137 |
if torch.cuda.is_available():
|
| 138 |
-
power_device = "
|
| 139 |
else:
|
| 140 |
-
power_device = "
|
| 141 |
|
| 142 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
| 143 |
with gr.Column(elem_id="col-container"):
|
| 144 |
gr.Markdown(f"""
|
| 145 |
-
#
|
| 146 |
-
|
| 147 |
""")
|
| 148 |
with gr.Row():
|
| 149 |
prompt = gr.Textbox(
|
| 150 |
elem_id="prompt",
|
| 151 |
-
placeholder="
|
| 152 |
container=False,
|
| 153 |
rtl=True,
|
| 154 |
max_lines=1
|
| 155 |
)
|
| 156 |
prompt2 = gr.Textbox(
|
| 157 |
elem_id="prompt2",
|
| 158 |
-
placeholder="
|
| 159 |
container=False,
|
| 160 |
rtl=True,
|
| 161 |
max_lines=1
|
| 162 |
)
|
| 163 |
with gr.Row():
|
| 164 |
-
run_button = gr.Button("
|
| 165 |
result = gr.Image(elem_id="image-container", label="Result", show_label=False, type='filepath', show_share_button=False)
|
| 166 |
prompt.submit(
|
| 167 |
fn = infer,
|
|
|
|
| 112 |
return name
|
| 113 |
|
| 114 |
css="""
|
| 115 |
+
* {
|
| 116 |
+
align-text: center;
|
| 117 |
+
direction: rtl;
|
| 118 |
+
}
|
| 119 |
footer {
|
| 120 |
display: none !important;
|
| 121 |
}
|
|
|
|
| 139 |
"""
|
| 140 |
|
| 141 |
if torch.cuda.is_available():
|
| 142 |
+
power_device = "诪注讘讚 讙专驻讬"
|
| 143 |
else:
|
| 144 |
+
power_device = "诪注讘讚 诇讜讙讬"
|
| 145 |
|
| 146 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
| 147 |
with gr.Column(elem_id="col-container"):
|
| 148 |
gr.Markdown(f"""
|
| 149 |
+
# 转诪讜谞讜转 专讬讗诇讬住讟讬讜转 诇驻讬 讘拽砖讛
|
| 150 |
+
专抓 注诇 {power_device}.
|
| 151 |
""")
|
| 152 |
with gr.Row():
|
| 153 |
prompt = gr.Textbox(
|
| 154 |
elem_id="prompt",
|
| 155 |
+
placeholder="诪讛 *讻谉* 诇讛讜住讬祝",
|
| 156 |
container=False,
|
| 157 |
rtl=True,
|
| 158 |
max_lines=1
|
| 159 |
)
|
| 160 |
prompt2 = gr.Textbox(
|
| 161 |
elem_id="prompt2",
|
| 162 |
+
placeholder="诪讛 *诇讗* 诇讛讜住讬祝",
|
| 163 |
container=False,
|
| 164 |
rtl=True,
|
| 165 |
max_lines=1
|
| 166 |
)
|
| 167 |
with gr.Row():
|
| 168 |
+
run_button = gr.Button("讛转讞诇讛")
|
| 169 |
result = gr.Image(elem_id="image-container", label="Result", show_label=False, type='filepath', show_share_button=False)
|
| 170 |
prompt.submit(
|
| 171 |
fn = infer,
|