Spaces:
Sleeping
Sleeping
Antonela Tamagnini commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,6 +36,24 @@ def respond(
|
|
| 36 |
response += token
|
| 37 |
yield response
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
# Gradio interface with additional components
|
| 40 |
demo = gr.ChatInterface(
|
| 41 |
respond,
|
|
@@ -52,6 +70,7 @@ demo = gr.ChatInterface(
|
|
| 52 |
label="Top-p (nucleus sampling)",
|
| 53 |
),
|
| 54 |
],
|
|
|
|
| 55 |
)
|
| 56 |
|
| 57 |
if __name__ == "__main__":
|
|
|
|
| 36 |
response += token
|
| 37 |
yield response
|
| 38 |
|
| 39 |
+
# Custom CSS for styling the header and logo
|
| 40 |
+
custom_css = """
|
| 41 |
+
#header {
|
| 42 |
+
display: flex;
|
| 43 |
+
align-items: center;
|
| 44 |
+
justify-content: space-between;
|
| 45 |
+
margin-bottom: 20px;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
#logo {
|
| 49 |
+
height: 50px; /* Set the height of the logo */
|
| 50 |
+
width: auto; /* Maintain aspect ratio */
|
| 51 |
+
position: absolute; /* Position the logo */
|
| 52 |
+
top: 20px; /* Distance from the top */
|
| 53 |
+
right: 20px; /* Distance from the right */
|
| 54 |
+
}
|
| 55 |
+
"""
|
| 56 |
+
|
| 57 |
# Gradio interface with additional components
|
| 58 |
demo = gr.ChatInterface(
|
| 59 |
respond,
|
|
|
|
| 70 |
label="Top-p (nucleus sampling)",
|
| 71 |
),
|
| 72 |
],
|
| 73 |
+
css=custom_css
|
| 74 |
)
|
| 75 |
|
| 76 |
if __name__ == "__main__":
|