Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -326,18 +326,6 @@ Question: {query} [/INST]</s>"""
|
|
326 |
self.conversation_history = []
|
327 |
return "Conversation has been reset."
|
328 |
|
329 |
-
# Main function with Gradio UI
|
330 |
-
import os
|
331 |
-
import re
|
332 |
-
import json
|
333 |
-
import time
|
334 |
-
from tqdm import tqdm
|
335 |
-
from pathlib import Path
|
336 |
-
import spaces
|
337 |
-
import gradio as gr
|
338 |
-
|
339 |
-
# WARNING: Don't import torch, cuda, or GPU-related modules at the top level
|
340 |
-
# All previous helper functions and classes remain the same
|
341 |
|
342 |
def main():
|
343 |
# Create the Vision 2030 service
|
@@ -377,16 +365,23 @@ def main():
|
|
377 |
.chat-input { background-color: white; border-radius: 8px; border: 1px solid #ddd; }
|
378 |
.info-box { background-color: #f8f9fa; padding: 10px; border-radius: 8px; margin-top: 10px; }
|
379 |
""") as demo:
|
380 |
-
# Header with
|
381 |
with gr.Row():
|
382 |
-
with gr.Column(
|
383 |
-
gr.
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
""")
|
391 |
|
392 |
# Language toggle in the header
|
@@ -408,10 +403,6 @@ def main():
|
|
408 |
chatbot = gr.Chatbot(
|
409 |
height=450,
|
410 |
bubble_full_width=False,
|
411 |
-
avatar_images=(
|
412 |
-
"https://api.iconify.design/fluent-emoji:person.svg",
|
413 |
-
"https://api.iconify.design/fluent-emoji:robot.svg"
|
414 |
-
),
|
415 |
show_label=False
|
416 |
)
|
417 |
|
|
|
326 |
self.conversation_history = []
|
327 |
return "Conversation has been reset."
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
|
330 |
def main():
|
331 |
# Create the Vision 2030 service
|
|
|
365 |
.chat-input { background-color: white; border-radius: 8px; border: 1px solid #ddd; }
|
366 |
.info-box { background-color: #f8f9fa; padding: 10px; border-radius: 8px; margin-top: 10px; }
|
367 |
""") as demo:
|
368 |
+
# Header with stylized title (no external images)
|
369 |
with gr.Row():
|
370 |
+
with gr.Column():
|
371 |
+
gr.HTML("""
|
372 |
+
<div style="display: flex; align-items: center; margin-bottom: 20px;">
|
373 |
+
<div style="background: linear-gradient(135deg, #1e9e5a, #45b08c);
|
374 |
+
color: white; padding: 15px; border-radius: 10px;
|
375 |
+
margin-right: 20px; width: 80px; height: 80px;
|
376 |
+
display: flex; justify-content: center; align-items: center;
|
377 |
+
font-weight: bold; font-size: 24px;">
|
378 |
+
V2030
|
379 |
+
</div>
|
380 |
+
<div>
|
381 |
+
<h1 style="margin: 0; color: #1e9e5a;">Vision 2030 Assistant</h1>
|
382 |
+
<h3 style="margin: 5px 0 0 0; font-weight: normal;">Your interactive guide to Saudi Arabia's national transformation program</h3>
|
383 |
+
</div>
|
384 |
+
</div>
|
385 |
""")
|
386 |
|
387 |
# Language toggle in the header
|
|
|
403 |
chatbot = gr.Chatbot(
|
404 |
height=450,
|
405 |
bubble_full_width=False,
|
|
|
|
|
|
|
|
|
406 |
show_label=False
|
407 |
)
|
408 |
|