Update app.py
Browse files
app.py
CHANGED
|
@@ -17,19 +17,15 @@ with gr.Blocks(css="""
|
|
| 17 |
<div class="debug-info" id="debug-info"></div>
|
| 18 |
<script>
|
| 19 |
function setDefaultText() {
|
| 20 |
-
// 尝试不同的选择器来定位输入框
|
| 21 |
const textareas = document.querySelectorAll('textarea');
|
| 22 |
const inputs = document.querySelectorAll('input[type="text"]');
|
| 23 |
const debugInfo = document.getElementById('debug-info');
|
| 24 |
|
| 25 |
-
// 调试信息
|
| 26 |
let info = `找到 ${textareas.length} 个textarea和 ${inputs.length} 个text input\n`;
|
| 27 |
|
| 28 |
-
// 尝试设置每个文本框的值
|
| 29 |
textareas.forEach((textarea, index) => {
|
| 30 |
info += `Textarea ${index}: ${textarea.className}\n`;
|
| 31 |
textarea.value = "Hi! Create a image.";
|
| 32 |
-
// 触发input事件以确保Gradio检测到变化
|
| 33 |
textarea.dispatchEvent(new Event('input', { bubbles: true }));
|
| 34 |
});
|
| 35 |
|
|
@@ -40,26 +36,22 @@ with gr.Blocks(css="""
|
|
| 40 |
});
|
| 41 |
|
| 42 |
debugInfo.textContent = info;
|
| 43 |
-
debugInfo.style.display = 'block';
|
| 44 |
}
|
| 45 |
|
| 46 |
-
// 等待一段时间后执行
|
| 47 |
setTimeout(() => {
|
| 48 |
setDefaultText();
|
| 49 |
-
// 如果第一次不成功,再试一次
|
| 50 |
setTimeout(setDefaultText, 1000);
|
| 51 |
}, 2000);
|
| 52 |
</script>
|
| 53 |
""")
|
| 54 |
|
| 55 |
-
# 添加底部文案和链接
|
| 56 |
with gr.Row():
|
| 57 |
gr.Markdown("""
|
| 58 |
**Best AI Tools**
|
| 59 |
-
[Nude AI](https://nudeai.beauty) • [Uncensored AI](https://uncensoredai.cc) • [AI Hentai Generator](https://aihentaigenerator.fun) • [Stable Diffusion Hentai](https://stable-diffusion-hentai.aihentaigenerator.fun) • [Bing Image Creator](https://bingimagecreator.online) • [NSFW AI Art](https://nsfwaiart.art) • [NSFW AI Chatbot](https://nsfw-ai-chatbot.online) • [NSFW AI World](https://nsfwai.world) • [AI Tools Directory](https://aitoolsdirectory.online) • [Viggle AI](https://viggleai.live) • [TDEE Calculator](https://tdeecalculator.online) • [Calculator App](https://calculatorapp.online) • [Compound Interest Calculator](https://compoundinterestcalculator.site) • [AI Story Generator](https://aistorygenerator.fun) • [Llama AI](https://llamaai.online) • [AI Art Free](https://aiartfree.online) • [Cek Khodam](https://cekkhodam.co) • [AI Detector](https://ai-detector.online) • [AI Cover](https://aicover.fun) • [Flux AI](https://flux-ai.online) • [Brat Generator](https://bratgenerator.org) • [AI Text Generator](https://aitextgenerator.live) • [Black Myth Wukong](https://blackmythwukong.buzz) • [Book Summary](https://booksummary.wiki) • [ChatGPT Gratuit](https://chatgptgratuit.chat) • [ChatGPT Online](https://chatgtponline.com) • [Gau Thai](https://gauthai.pro) • [Best Recipe](https://bestrecipe.pro)
|
| 60 |
-
**Games**
|
| 61 |
-
[Cookie Clicker Unblocked](https://cookie-clicker-unblocked.pro) • [Freaky Font](https://freakyfont.org) • [Chat Gratuito](https://chatgratuito.online) • [Incredibox Sprunki](https://incrediboxsprunki.pro) • [Moto X3M Unblocked](https://motox3munblocked.pro) • [Parkour Civilization](https://parkourcivilization.pro) • [Sled Rider 3D](https://sledrider3d.com) • [Snow Rider 3D](https://snow-rider-3d.pro) • [Sprunki Game](https://sprunkigame.pro) • [Stickman Hook Unblocked](https://stickmanhookunblocked.pro)
|
| 62 |
-
|
| 63 |
""")
|
| 64 |
|
| 65 |
# 最后启动应用
|
|
|
|
| 17 |
<div class="debug-info" id="debug-info"></div>
|
| 18 |
<script>
|
| 19 |
function setDefaultText() {
|
|
|
|
| 20 |
const textareas = document.querySelectorAll('textarea');
|
| 21 |
const inputs = document.querySelectorAll('input[type="text"]');
|
| 22 |
const debugInfo = document.getElementById('debug-info');
|
| 23 |
|
|
|
|
| 24 |
let info = `找到 ${textareas.length} 个textarea和 ${inputs.length} 个text input\n`;
|
| 25 |
|
|
|
|
| 26 |
textareas.forEach((textarea, index) => {
|
| 27 |
info += `Textarea ${index}: ${textarea.className}\n`;
|
| 28 |
textarea.value = "Hi! Create a image.";
|
|
|
|
| 29 |
textarea.dispatchEvent(new Event('input', { bubbles: true }));
|
| 30 |
});
|
| 31 |
|
|
|
|
| 36 |
});
|
| 37 |
|
| 38 |
debugInfo.textContent = info;
|
| 39 |
+
debugInfo.style.display = 'block';
|
| 40 |
}
|
| 41 |
|
|
|
|
| 42 |
setTimeout(() => {
|
| 43 |
setDefaultText();
|
|
|
|
| 44 |
setTimeout(setDefaultText, 1000);
|
| 45 |
}, 2000);
|
| 46 |
</script>
|
| 47 |
""")
|
| 48 |
|
|
|
|
| 49 |
with gr.Row():
|
| 50 |
gr.Markdown("""
|
| 51 |
**Best AI Tools**
|
| 52 |
+
[Nude AI](https://nudeai.beauty) • [Uncensored AI](https://uncensoredai.cc) • [AI Hentai Generator](https://aihentaigenerator.fun) • [Stable Diffusion Hentai](https://stable-diffusion-hentai.aihentaigenerator.fun) • [Bing Image Creator](https://bingimagecreator.online) • [NSFW AI Art](https://nsfwaiart.art) • [NSFW AI Chatbot](https://nsfw-ai-chatbot.online) • [NSFW AI World](https://nsfwai.world) • [AI Tools Directory](https://aitoolsdirectory.online) • [Viggle AI](https://viggleai.live) • [TDEE Calculator](https://tdeecalculator.online) • [Calculator App](https://calculatorapp.online) • [Compound Interest Calculator](https://compoundinterestcalculator.site) • [AI Story Generator](https://aistorygenerator.fun) • [Llama AI](https://llamaai.online) • [AI Art Free](https://aiartfree.online) • [Cek Khodam](https://cekkhodam.co) • [AI Detector](https://ai-detector.online) • [AI Cover](https://aicover.fun) • [Flux AI](https://flux-ai.online) • [Brat Generator](https://bratgenerator.org) • [AI Text Generator](https://aitextgenerator.live) • [Black Myth Wukong](https://blackmythwukong.buzz) • [Book Summary](https://booksummary.wiki) • [ChatGPT Gratuit](https://chatgptgratuit.chat) • [ChatGPT Online](https://chatgtponline.com) • [Gau Thai](https://gauthai.pro) • [Best Recipe](https://bestrecipe.pro)
|
| 53 |
+
**Games**
|
| 54 |
+
[Cookie Clicker Unblocked](https://cookie-clicker-unblocked.pro) • [Freaky Font](https://freakyfont.org) • [Chat Gratuito](https://chatgratuito.online) • [Incredibox Sprunki](https://incrediboxsprunki.pro) • [Moto X3M Unblocked](https://motox3munblocked.pro) • [Parkour Civilization](https://parkourcivilization.pro) • [Sled Rider 3D](https://sledrider3d.com) • [Snow Rider 3D](https://snow-rider-3d.pro) • [Sprunki Game](https://sprunkigame.pro) • [Stickman Hook Unblocked](https://stickmanhookunblocked.pro)
|
|
|
|
| 55 |
""")
|
| 56 |
|
| 57 |
# 最后启动应用
|