Spaces:
Paused
Paused
Carlos Rosas
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -199,7 +199,7 @@ css = """
|
|
| 199 |
}
|
| 200 |
.section-title {
|
| 201 |
font-weight: bold;
|
| 202 |
-
font-size:
|
| 203 |
margin-bottom: 1em;
|
| 204 |
margin-top: 1em;
|
| 205 |
}
|
|
@@ -211,16 +211,28 @@ def gradio_interface(user_message):
|
|
| 211 |
return response, sources
|
| 212 |
|
| 213 |
# Create Gradio app
|
| 214 |
-
demo = gr.Blocks(css=css
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
|
| 216 |
with demo:
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
with gr.Row():
|
| 219 |
with gr.Column(scale=2):
|
| 220 |
text_input = gr.Textbox(label="Votre question ou votre instruction", lines=3)
|
| 221 |
-
text_button = gr.Button("Interroger
|
| 222 |
with gr.Column(scale=3):
|
| 223 |
-
text_output = gr.HTML(label="La réponse de
|
| 224 |
with gr.Row():
|
| 225 |
embedding_output = gr.HTML(label="Les sources utilisées")
|
| 226 |
|
|
|
|
| 199 |
}
|
| 200 |
.section-title {
|
| 201 |
font-weight: bold;
|
| 202 |
+
font-size: 15px;
|
| 203 |
margin-bottom: 1em;
|
| 204 |
margin-top: 1em;
|
| 205 |
}
|
|
|
|
| 211 |
return response, sources
|
| 212 |
|
| 213 |
# Create Gradio app
|
| 214 |
+
demo = gr.Blocks(css=css + """
|
| 215 |
+
.logo {
|
| 216 |
+
display: block;
|
| 217 |
+
margin: 0 auto;
|
| 218 |
+
width: 200px;
|
| 219 |
+
height: 200px;
|
| 220 |
+
margin-bottom: 1em;
|
| 221 |
+
}
|
| 222 |
+
""")
|
| 223 |
|
| 224 |
with demo:
|
| 225 |
+
# Add logo and title
|
| 226 |
+
gr.HTML("""
|
| 227 |
+
<img src="pleias.png" class="logo" alt="Pleias Logo">
|
| 228 |
+
<h1 style="text-align:center">Cassandre</h1>
|
| 229 |
+
""")
|
| 230 |
with gr.Row():
|
| 231 |
with gr.Column(scale=2):
|
| 232 |
text_input = gr.Textbox(label="Votre question ou votre instruction", lines=3)
|
| 233 |
+
text_button = gr.Button("Interroger Cassandre")
|
| 234 |
with gr.Column(scale=3):
|
| 235 |
+
text_output = gr.HTML(label="La réponse de Cassandre")
|
| 236 |
with gr.Row():
|
| 237 |
embedding_output = gr.HTML(label="Les sources utilisées")
|
| 238 |
|