Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,34 @@ import utils
|
|
| 7 |
|
| 8 |
from deep_translator import GoogleTranslator
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Модельді жүктеу
|
| 12 |
gemma_lm = keras_nlp.models.CausalLM.from_preset("hf://sultan-hassan/CosmoGemma_2b_en")
|
| 13 |
chat = utils.ChatState(gemma_lm)
|
|
|
|
| 7 |
|
| 8 |
from deep_translator import GoogleTranslator
|
| 9 |
|
| 10 |
+
css = """
|
| 11 |
+
html, body {
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 0;
|
| 14 |
+
height: 100%;
|
| 15 |
+
overflow: hidden;
|
| 16 |
+
}
|
| 17 |
+
body::before {
|
| 18 |
+
content: '';
|
| 19 |
+
position: fixed;
|
| 20 |
+
top: 0;
|
| 21 |
+
left: 0;
|
| 22 |
+
width: 100vw;
|
| 23 |
+
height: 100vh;
|
| 24 |
+
background-image: url('https://stsci-opo.org/STScI-01J5E849R5W27ZZ2C3QAE9ET75.png');
|
| 25 |
+
background-size: cover;
|
| 26 |
+
background-repeat: no-repeat;
|
| 27 |
+
opacity: 0.35;
|
| 28 |
+
background-position: center;
|
| 29 |
+
z-index: -1;
|
| 30 |
+
}
|
| 31 |
+
.gradio-container {
|
| 32 |
+
display: flex;
|
| 33 |
+
justify-content: center;
|
| 34 |
+
align-items: center;
|
| 35 |
+
height: 100vh;
|
| 36 |
+
}
|
| 37 |
+
"""
|
| 38 |
# Модельді жүктеу
|
| 39 |
gemma_lm = keras_nlp.models.CausalLM.from_preset("hf://sultan-hassan/CosmoGemma_2b_en")
|
| 40 |
chat = utils.ChatState(gemma_lm)
|