Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,10 +103,100 @@ def model_generate_ans(img=None,img_audio=None,val_q=None):
|
|
103 |
|
104 |
with gr.Blocks() as demo:
|
105 |
|
|
|
106 |
gr.Markdown(
|
107 |
"""
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
"""
|
111 |
)
|
112 |
|
|
|
103 |
|
104 |
with gr.Blocks() as demo:
|
105 |
|
106 |
+
# Add custom CSS stylesheet within Markdown
|
107 |
gr.Markdown(
|
108 |
"""
|
109 |
+
<style>
|
110 |
+
/* General Layout */
|
111 |
+
body {
|
112 |
+
font-family: 'Arial', sans-serif;
|
113 |
+
background-color: #f9f9f9;
|
114 |
+
margin: 0;
|
115 |
+
padding: 0;
|
116 |
+
}
|
117 |
+
|
118 |
+
/* Header */
|
119 |
+
h1, h2, h3 {
|
120 |
+
text-align: center;
|
121 |
+
color: #333;
|
122 |
+
font-weight: bold;
|
123 |
+
}
|
124 |
+
|
125 |
+
gr-Markdown h1 {
|
126 |
+
font-size: 28px;
|
127 |
+
color: #4CAF50;
|
128 |
+
}
|
129 |
+
|
130 |
+
/* Container and Columns */
|
131 |
+
.gr-row {
|
132 |
+
display: flex;
|
133 |
+
justify-content: center;
|
134 |
+
margin: 20px 0;
|
135 |
+
}
|
136 |
+
|
137 |
+
.gr-column {
|
138 |
+
flex: 1;
|
139 |
+
margin: 0 10px;
|
140 |
+
padding: 10px;
|
141 |
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
142 |
+
background-color: #fff;
|
143 |
+
border-radius: 8px;
|
144 |
+
}
|
145 |
+
|
146 |
+
/* Input Components */
|
147 |
+
.gr-Image, .gr-Audio, .gr-Text {
|
148 |
+
width: 100%;
|
149 |
+
margin-bottom: 15px;
|
150 |
+
}
|
151 |
+
|
152 |
+
.gr-Image label, .gr-Audio label, .gr-Text label {
|
153 |
+
font-size: 16px;
|
154 |
+
font-weight: bold;
|
155 |
+
color: #555;
|
156 |
+
}
|
157 |
+
|
158 |
+
/* Submit Button */
|
159 |
+
.gr-Button {
|
160 |
+
width: 100%;
|
161 |
+
background-color: #4CAF50;
|
162 |
+
color: white;
|
163 |
+
padding: 10px;
|
164 |
+
font-size: 16px;
|
165 |
+
border: none;
|
166 |
+
border-radius: 5px;
|
167 |
+
cursor: pointer;
|
168 |
+
transition: background-color 0.3s ease;
|
169 |
+
}
|
170 |
+
|
171 |
+
.gr-Button:hover {
|
172 |
+
background-color: #45a049;
|
173 |
+
}
|
174 |
+
|
175 |
+
/* Text Output */
|
176 |
+
.gr-Text {
|
177 |
+
font-size: 16px;
|
178 |
+
color: #333;
|
179 |
+
min-height: 100px;
|
180 |
+
padding: 10px;
|
181 |
+
border: 1px solid #ddd;
|
182 |
+
border-radius: 5px;
|
183 |
+
}
|
184 |
+
|
185 |
+
/* Responsive Design */
|
186 |
+
@media (max-width: 768px) {
|
187 |
+
.gr-row {
|
188 |
+
flex-direction: column;
|
189 |
+
}
|
190 |
+
|
191 |
+
.gr-column {
|
192 |
+
margin: 10px 0;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
</style>
|
196 |
+
|
197 |
+
# Discover MultiModal GPT: A New AI Experience!
|
198 |
+
Leveraging the best of CLIP and Phi-2 models for enhanced image, audio, and text understanding.
|
199 |
+
|
200 |
"""
|
201 |
)
|
202 |
|