Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import joblib
|
|
| 3 |
import numpy as np
|
| 4 |
from sklearn.preprocessing import LabelEncoder
|
| 5 |
import warnings
|
|
|
|
| 6 |
|
| 7 |
# Suppress warnings
|
| 8 |
warnings.filterwarnings("ignore")
|
|
@@ -67,11 +68,31 @@ def predict_merienda(mood, weather, craving, last_meal, budget):
|
|
| 67 |
|
| 68 |
return pred_flavor, pred_topping, pred_drink
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
# Create Gradio interface with emoji options
|
| 71 |
-
with gr.Blocks(title="✨Canton-ality Test: Alamin ang Totoong Flavor Mo🧐 ", theme=gr.themes.Soft()) as app:
|
| 72 |
gr.Markdown("""
|
| 73 |
# ✨ Canton-ality Test: Alamin ang Totoong Flavor Mo 🧐
|
| 74 |
-
Kwek-kwek or Fishballs? Let
|
| 75 |
""")
|
| 76 |
|
| 77 |
with gr.Row():
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
from sklearn.preprocessing import LabelEncoder
|
| 5 |
import warnings
|
| 6 |
+
import base64
|
| 7 |
|
| 8 |
# Suppress warnings
|
| 9 |
warnings.filterwarnings("ignore")
|
|
|
|
| 68 |
|
| 69 |
return pred_flavor, pred_topping, pred_drink
|
| 70 |
|
| 71 |
+
# CSS for background image
|
| 72 |
+
css = """
|
| 73 |
+
body {
|
| 74 |
+
background-image: url('https://i.imgur.com/your_image_id.jpg');
|
| 75 |
+
background-size: cover;
|
| 76 |
+
background-position: center;
|
| 77 |
+
background-repeat: no-repeat;
|
| 78 |
+
background-attachment: fixed;
|
| 79 |
+
height: 100vh;
|
| 80 |
+
margin: 0;
|
| 81 |
+
}
|
| 82 |
+
.gradio-container {
|
| 83 |
+
background-color: rgba(255, 255, 255, 0.8);
|
| 84 |
+
border-radius: 10px;
|
| 85 |
+
padding: 20px;
|
| 86 |
+
max-width: 800px;
|
| 87 |
+
margin: 20px auto;
|
| 88 |
+
}
|
| 89 |
+
"""
|
| 90 |
+
|
| 91 |
# Create Gradio interface with emoji options
|
| 92 |
+
with gr.Blocks(title="✨Canton-ality Test: Alamin ang Totoong Flavor Mo🧐 ", theme=gr.themes.Soft(), css=css) as app:
|
| 93 |
gr.Markdown("""
|
| 94 |
# ✨ Canton-ality Test: Alamin ang Totoong Flavor Mo 🧐
|
| 95 |
+
Kwek-kwek or Fishballs? Let's see what the merienda gods say...
|
| 96 |
""")
|
| 97 |
|
| 98 |
with gr.Row():
|