Spaces:
Sleeping
Sleeping
Palbha Kulkarni (Nazwale)
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,63 +2,6 @@ import gradio as gr
|
|
2 |
import openai
|
3 |
from baseline_code import *
|
4 |
|
5 |
-
# Qatar Airways-style theme
|
6 |
-
custom_css = """
|
7 |
-
body {
|
8 |
-
background-color: #f5f5dc;
|
9 |
-
margin: 0;
|
10 |
-
padding: 0;
|
11 |
-
}
|
12 |
-
|
13 |
-
.gradio-container {
|
14 |
-
font-family: 'Lato', sans-serif;
|
15 |
-
padding: 20px;
|
16 |
-
}
|
17 |
-
|
18 |
-
h1 {
|
19 |
-
color: #5c0a0a;
|
20 |
-
}
|
21 |
-
|
22 |
-
textarea, input, .message {
|
23 |
-
background-color: #fff8f0 !important;
|
24 |
-
color: #333 !important;
|
25 |
-
border-radius: 8px !important;
|
26 |
-
border: 1px solid #ddd !important;
|
27 |
-
}
|
28 |
-
|
29 |
-
.message.user {
|
30 |
-
border-left: 4px solid #5c0a0a;
|
31 |
-
padding-left: 8px;
|
32 |
-
margin-bottom: 10px;
|
33 |
-
}
|
34 |
-
|
35 |
-
.message.assistant {
|
36 |
-
border-left: 4px solid #d4af37;
|
37 |
-
padding-left: 8px;
|
38 |
-
margin-bottom: 10px;
|
39 |
-
}
|
40 |
-
|
41 |
-
button {
|
42 |
-
background-color: #5c0a0a !important;
|
43 |
-
color: white !important;
|
44 |
-
border-radius: 10px !important;
|
45 |
-
padding: 8px 16px;
|
46 |
-
border: none;
|
47 |
-
}
|
48 |
-
|
49 |
-
button:hover {
|
50 |
-
background-color: #a01010 !important;
|
51 |
-
}
|
52 |
-
|
53 |
-
.gr-chatbot {
|
54 |
-
background-color: #fffdf5 !important;
|
55 |
-
border: 1px solid #ddd !important;
|
56 |
-
border-radius: 10px !important;
|
57 |
-
padding: 10px;
|
58 |
-
max-height: 400px;
|
59 |
-
overflow-y: auto;
|
60 |
-
}
|
61 |
-
"""
|
62 |
|
63 |
|
64 |
# Model-specific response logic
|
@@ -89,7 +32,7 @@ with gr.Blocks() as app:
|
|
89 |
|
90 |
with gr.Column(scale=3):
|
91 |
gr.Markdown("<h1>✈️ AirlineX Airways Virtual Assistant</h1>")
|
92 |
-
chatbot = gr.Chatbot(label="Assistant", height=
|
93 |
msg = gr.Textbox(label="Your Message")
|
94 |
state = gr.State([])
|
95 |
|
|
|
2 |
import openai
|
3 |
from baseline_code import *
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
|
7 |
# Model-specific response logic
|
|
|
32 |
|
33 |
with gr.Column(scale=3):
|
34 |
gr.Markdown("<h1>✈️ AirlineX Airways Virtual Assistant</h1>")
|
35 |
+
chatbot = gr.Chatbot(label="Assistant", height=700,type="messages")
|
36 |
msg = gr.Textbox(label="Your Message")
|
37 |
state = gr.State([])
|
38 |
|