Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,20 @@ with gr.Blocks() as demo:
|
|
8 |
# 渲染原始模型界面
|
9 |
model.render()
|
10 |
|
11 |
-
|
12 |
-
gr.Markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# 添加底部文案和链接
|
15 |
with gr.Row():
|
|
|
8 |
# 渲染原始模型界面
|
9 |
model.render()
|
10 |
|
11 |
+
# 添加JavaScript来设置默认值
|
12 |
+
gr.Markdown("""
|
13 |
+
<script>
|
14 |
+
// 等待页面加载完成
|
15 |
+
window.addEventListener('load', function() {
|
16 |
+
// 获取所有文本输入框
|
17 |
+
var textboxes = document.querySelectorAll('textarea');
|
18 |
+
// 设置第一个输入框的默认值
|
19 |
+
if (textboxes.length > 0) {
|
20 |
+
textboxes[0].value = "beautiful sexy woman, big boobs at car, relaxing, ethereal, dreamy, backlit, highly detailed, realistic lighting, sharp focus, rule of thirds, artgerm";
|
21 |
+
}
|
22 |
+
});
|
23 |
+
</script>
|
24 |
+
""", elem_classes="custom-js")
|
25 |
|
26 |
# 添加底部文案和链接
|
27 |
with gr.Row():
|