Spaces:
Running
Running
Update interface.py
Browse files- interface.py +46 -24
interface.py
CHANGED
|
@@ -8,18 +8,21 @@ from ai_logic import (
|
|
| 8 |
)
|
| 9 |
|
| 10 |
css_customizado = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
.gradio-container {
|
| 12 |
max-width: 1400px !important;
|
| 13 |
margin: 0 auto;
|
| 14 |
width: 99%;
|
| 15 |
-
height: 100% !important;
|
| 16 |
display: flex;
|
| 17 |
flex-direction: column;
|
| 18 |
-
overflow: hidden;
|
| 19 |
}
|
| 20 |
|
| 21 |
.main-content {
|
| 22 |
-
height: 100vh
|
| 23 |
display: flex;
|
| 24 |
flex-direction: column;
|
| 25 |
overflow: hidden;
|
|
@@ -30,7 +33,7 @@ css_customizado = """
|
|
| 30 |
color: white !important;
|
| 31 |
padding: 20px !important;
|
| 32 |
border-radius: 10px !important;
|
| 33 |
-
margin
|
| 34 |
text-align: center !important;
|
| 35 |
height: 10vh !important;
|
| 36 |
display: flex;
|
|
@@ -41,24 +44,27 @@ css_customizado = """
|
|
| 41 |
}
|
| 42 |
|
| 43 |
.chat-container {
|
| 44 |
-
height:
|
| 45 |
overflow-y: auto;
|
| 46 |
-
flex-
|
| 47 |
-
margin
|
| 48 |
}
|
| 49 |
|
| 50 |
.input-container {
|
| 51 |
-
height:
|
| 52 |
display: flex;
|
| 53 |
flex-direction: column;
|
| 54 |
justify-content: center;
|
|
|
|
| 55 |
flex-shrink: 0;
|
| 56 |
-
padding: 10px
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
.additional-content {
|
| 60 |
overflow-y: auto;
|
| 61 |
-
padding
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
.gr-textbox textarea {
|
|
@@ -89,21 +95,17 @@ css_customizado = """
|
|
| 89 |
|
| 90 |
.modelo-dropdown {
|
| 91 |
margin-bottom: 15px !important;
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
.unequal-height.svelte-1xp0cw7 {
|
| 95 |
-
align-items: normal !important;
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
div.svelte-1xp0cw7 {
|
| 99 |
-
display: grid !important;
|
| 100 |
}
|
| 101 |
|
| 102 |
#entrada_usuario textarea {
|
| 103 |
color: white !important;
|
| 104 |
-
font-size:
|
| 105 |
background-color: #1a1a1a !important;
|
| 106 |
min-height: 60px !important;
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
|
| 109 |
.message-content {
|
|
@@ -112,24 +114,32 @@ div.svelte-1xp0cw7 {
|
|
| 112 |
background-color: #1a1a1a !important;
|
| 113 |
}
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
/* Responsivo para dispositivos móveis */
|
| 116 |
@media (max-width: 768px) {
|
| 117 |
.titulo-principal {
|
| 118 |
height: 12vh !important;
|
| 119 |
padding: 15px !important;
|
|
|
|
| 120 |
}
|
| 121 |
|
| 122 |
.chat-container {
|
| 123 |
-
height:
|
| 124 |
}
|
| 125 |
|
| 126 |
.input-container {
|
| 127 |
-
height:
|
|
|
|
| 128 |
}
|
| 129 |
|
| 130 |
#entrada_usuario textarea {
|
| 131 |
min-height: 50px !important;
|
| 132 |
-
font-size:
|
| 133 |
}
|
| 134 |
}
|
| 135 |
|
|
@@ -137,14 +147,26 @@ div.svelte-1xp0cw7 {
|
|
| 137 |
.titulo-principal {
|
| 138 |
height: 15vh !important;
|
| 139 |
padding: 10px !important;
|
|
|
|
|
|
|
| 140 |
}
|
| 141 |
|
| 142 |
.chat-container {
|
| 143 |
-
height:
|
| 144 |
}
|
| 145 |
|
| 146 |
.input-container {
|
| 147 |
-
height:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
}
|
| 149 |
}
|
| 150 |
"""
|
|
|
|
| 8 |
)
|
| 9 |
|
| 10 |
css_customizado = """
|
| 11 |
+
/* Estilo global */
|
| 12 |
+
* {
|
| 13 |
+
box-sizing: border-box;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
.gradio-container {
|
| 17 |
max-width: 1400px !important;
|
| 18 |
margin: 0 auto;
|
| 19 |
width: 99%;
|
|
|
|
| 20 |
display: flex;
|
| 21 |
flex-direction: column;
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
.main-content {
|
| 25 |
+
min-height: 100vh; /* Garante que o conteúdo principal ocupe a tela inteira */
|
| 26 |
display: flex;
|
| 27 |
flex-direction: column;
|
| 28 |
overflow: hidden;
|
|
|
|
| 33 |
color: white !important;
|
| 34 |
padding: 20px !important;
|
| 35 |
border-radius: 10px !important;
|
| 36 |
+
margin: 10px !important;
|
| 37 |
text-align: center !important;
|
| 38 |
height: 10vh !important;
|
| 39 |
display: flex;
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
.chat-container {
|
| 47 |
+
height: 75vh !important; /* Ajustado para ocupar o espaço restante */
|
| 48 |
overflow-y: auto;
|
| 49 |
+
flex-grow: 1; /* Cresce para preencher o espaço disponível */
|
| 50 |
+
margin: 10px !important;
|
| 51 |
}
|
| 52 |
|
| 53 |
.input-container {
|
| 54 |
+
height: 15vh !important; /* Aumentado para melhor centralização */
|
| 55 |
display: flex;
|
| 56 |
flex-direction: column;
|
| 57 |
justify-content: center;
|
| 58 |
+
align-items: center; /* Centraliza horizontalmente */
|
| 59 |
flex-shrink: 0;
|
| 60 |
+
padding: 10px;
|
| 61 |
+
margin: 0 10px;
|
| 62 |
}
|
| 63 |
|
| 64 |
.additional-content {
|
| 65 |
overflow-y: auto;
|
| 66 |
+
padding: 20px 10px;
|
| 67 |
+
flex-shrink: 0;
|
| 68 |
}
|
| 69 |
|
| 70 |
.gr-textbox textarea {
|
|
|
|
| 95 |
|
| 96 |
.modelo-dropdown {
|
| 97 |
margin-bottom: 15px !important;
|
| 98 |
+
width: 100%;
|
| 99 |
+
max-width: 300px; /* Limita a largura do dropdown */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
|
| 102 |
#entrada_usuario textarea {
|
| 103 |
color: white !important;
|
| 104 |
+
font-size: 16px !important;
|
| 105 |
background-color: #1a1a1a !important;
|
| 106 |
min-height: 60px !important;
|
| 107 |
+
width: 100%;
|
| 108 |
+
max-width: 800px; /* Limita a largura do campo de texto */
|
| 109 |
}
|
| 110 |
|
| 111 |
.message-content {
|
|
|
|
| 114 |
background-color: #1a1a1a !important;
|
| 115 |
}
|
| 116 |
|
| 117 |
+
/* Estilo do botão Enviar */
|
| 118 |
+
.gr-button.primary {
|
| 119 |
+
max-width: 150px; /* Limita a largura do botão */
|
| 120 |
+
margin: 10px auto; /* Centraliza horizontalmente */
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
/* Responsivo para dispositivos móveis */
|
| 124 |
@media (max-width: 768px) {
|
| 125 |
.titulo-principal {
|
| 126 |
height: 12vh !important;
|
| 127 |
padding: 15px !important;
|
| 128 |
+
margin: 5px !important;
|
| 129 |
}
|
| 130 |
|
| 131 |
.chat-container {
|
| 132 |
+
height: 73vh !important;
|
| 133 |
}
|
| 134 |
|
| 135 |
.input-container {
|
| 136 |
+
height: 15vh !important;
|
| 137 |
+
padding: 8px !important;
|
| 138 |
}
|
| 139 |
|
| 140 |
#entrada_usuario textarea {
|
| 141 |
min-height: 50px !important;
|
| 142 |
+
font-size: 14px !important;
|
| 143 |
}
|
| 144 |
}
|
| 145 |
|
|
|
|
| 147 |
.titulo-principal {
|
| 148 |
height: 15vh !important;
|
| 149 |
padding: 10px !important;
|
| 150 |
+
margin: 5px !important;
|
| 151 |
+
font-size: 14px !important;
|
| 152 |
}
|
| 153 |
|
| 154 |
.chat-container {
|
| 155 |
+
height: 70vh !important;
|
| 156 |
}
|
| 157 |
|
| 158 |
.input-container {
|
| 159 |
+
height: 15vh !important;
|
| 160 |
+
padding: 5px !important;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
#entrada_usuario textarea {
|
| 164 |
+
min-height: 45px !important;
|
| 165 |
+
font-size: 13px !important;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.gr-button.primary {
|
| 169 |
+
max-width: 120px !important;
|
| 170 |
}
|
| 171 |
}
|
| 172 |
"""
|