Spaces:
Running
Running
Update interface.py
Browse files- interface.py +13 -11
interface.py
CHANGED
@@ -35,17 +35,6 @@ def criar_interface():
|
|
35 |
</div>
|
36 |
""")
|
37 |
|
38 |
-
|
39 |
-
gr.HTML("""
|
40 |
-
<script>
|
41 |
-
window.addEventListener("load", function() {
|
42 |
-
const caixa = document.querySelector("#entrada_usuario textarea");
|
43 |
-
if (caixa) {
|
44 |
-
setTimeout(() => caixa.focus(), 100);
|
45 |
-
}
|
46 |
-
});
|
47 |
-
</script>
|
48 |
-
""")
|
49 |
|
50 |
chatbot = gr.Chatbot(label="💬 Chat com Dr. Aldo", elem_id="chat")
|
51 |
|
@@ -135,6 +124,19 @@ def criar_interface():
|
|
135 |
- Faça perguntas específicas sobre o conteúdo do blog para ver o RAG em ação!
|
136 |
- Peça resumos ou opiniões sobre temas que o professor aborda.
|
137 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
return interface
|
140 |
|
|
|
35 |
</div>
|
36 |
""")
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
chatbot = gr.Chatbot(label="💬 Chat com Dr. Aldo", elem_id="chat")
|
40 |
|
|
|
124 |
- Faça perguntas específicas sobre o conteúdo do blog para ver o RAG em ação!
|
125 |
- Peça resumos ou opiniões sobre temas que o professor aborda.
|
126 |
""")
|
127 |
+
|
128 |
+
|
129 |
+
# Foco automático no campo de texto ao abrir
|
130 |
+
gr.HTML("""
|
131 |
+
<script>
|
132 |
+
window.addEventListener("load", function() {
|
133 |
+
const textarea = document.querySelector("#entrada_usuario textarea");
|
134 |
+
if (textarea) {
|
135 |
+
setTimeout(() => textarea.focus(), 100);
|
136 |
+
}
|
137 |
+
});
|
138 |
+
</script>
|
139 |
+
""")
|
140 |
|
141 |
return interface
|
142 |
|