Update app.py
Browse files
app.py
CHANGED
|
@@ -23,14 +23,14 @@ def generate_table(number):
|
|
| 23 |
|
| 24 |
# Gradio interface
|
| 25 |
title = """
|
| 26 |
-
<h1 style='color:purple; text-shadow:
|
| 27 |
"""
|
| 28 |
|
| 29 |
description = """
|
| 30 |
-
<h3 style='color:orange; text-shadow:
|
| 31 |
-
<p style='color:
|
| 32 |
Type a number to see its vibrant multiplication table!<br>
|
| 33 |
-
<span style='color:red;'>Type 0 to exit.</span>
|
| 34 |
</p>
|
| 35 |
"""
|
| 36 |
|
|
@@ -63,15 +63,24 @@ with gr.Blocks() as interface:
|
|
| 63 |
|
| 64 |
# Add custom CSS for styling
|
| 65 |
interface.css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
#input-box input {
|
| 67 |
background-color: #E0FFFF;
|
| 68 |
color: #008B8B;
|
| 69 |
font-size: 18px;
|
| 70 |
-
padding:
|
| 71 |
border: 2px solid #20B2AA;
|
| 72 |
border-radius: 8px;
|
| 73 |
text-align: center;
|
|
|
|
| 74 |
}
|
|
|
|
| 75 |
#output-box {
|
| 76 |
background-color: #FDF5E6;
|
| 77 |
color: #8B0000;
|
|
@@ -81,19 +90,54 @@ interface.css = """
|
|
| 81 |
border-radius: 10px;
|
| 82 |
overflow: auto;
|
| 83 |
}
|
|
|
|
| 84 |
#generate-button {
|
| 85 |
background-color: #FFE4B5;
|
| 86 |
color: #8B4513;
|
| 87 |
font-size: 18px;
|
| 88 |
-
padding:
|
| 89 |
border-radius: 10px;
|
| 90 |
border: 2px solid #CD853F;
|
| 91 |
cursor: pointer;
|
| 92 |
transition: 0.3s ease;
|
|
|
|
| 93 |
}
|
|
|
|
| 94 |
#generate-button:hover {
|
| 95 |
background-color: #FF6347;
|
| 96 |
color: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
"""
|
| 99 |
interface.launch()
|
|
|
|
| 23 |
|
| 24 |
# Gradio interface
|
| 25 |
title = """
|
| 26 |
+
<h1 style='color:purple; text-shadow: 3px 3px 8px #FF6347, 0 0 25px #FFD700; font-family: "Poppins", sans-serif; font-size: 45px; animation: bounce 2s infinite;'>π Multiplication Table Chatbot for Kids π</h1>
|
| 27 |
"""
|
| 28 |
|
| 29 |
description = """
|
| 30 |
+
<h3 style='color:orange; text-shadow: 2px 2px 5px #FF6347, 0 0 15px #FF4500; font-family: "Comic Sans MS", sans-serif; font-size: 28px; animation: slideIn 3s;'>π¨ Welcome to the fun and colorful multiplication chatbot for kids! π¨</h3>
|
| 31 |
+
<p style='color:blue; font-size: 22px; font-family: "Arial", sans-serif; text-shadow: 1px 1px 5px #1E90FF;'>
|
| 32 |
Type a number to see its vibrant multiplication table!<br>
|
| 33 |
+
<span style='color:red; font-size: 24px; font-weight: bold;'>Type <span style='color:green;'>0</span> to exit.</span>
|
| 34 |
</p>
|
| 35 |
"""
|
| 36 |
|
|
|
|
| 63 |
|
| 64 |
# Add custom CSS for styling
|
| 65 |
interface.css = """
|
| 66 |
+
body {
|
| 67 |
+
background: linear-gradient(135deg, #FFB6C1, #ADD8E6);
|
| 68 |
+
font-family: "Poppins", sans-serif;
|
| 69 |
+
margin: 0;
|
| 70 |
+
padding: 0;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
#input-box input {
|
| 74 |
background-color: #E0FFFF;
|
| 75 |
color: #008B8B;
|
| 76 |
font-size: 18px;
|
| 77 |
+
padding: 12px;
|
| 78 |
border: 2px solid #20B2AA;
|
| 79 |
border-radius: 8px;
|
| 80 |
text-align: center;
|
| 81 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 82 |
}
|
| 83 |
+
|
| 84 |
#output-box {
|
| 85 |
background-color: #FDF5E6;
|
| 86 |
color: #8B0000;
|
|
|
|
| 90 |
border-radius: 10px;
|
| 91 |
overflow: auto;
|
| 92 |
}
|
| 93 |
+
|
| 94 |
#generate-button {
|
| 95 |
background-color: #FFE4B5;
|
| 96 |
color: #8B4513;
|
| 97 |
font-size: 18px;
|
| 98 |
+
padding: 12px 24px;
|
| 99 |
border-radius: 10px;
|
| 100 |
border: 2px solid #CD853F;
|
| 101 |
cursor: pointer;
|
| 102 |
transition: 0.3s ease;
|
| 103 |
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
| 104 |
}
|
| 105 |
+
|
| 106 |
#generate-button:hover {
|
| 107 |
background-color: #FF6347;
|
| 108 |
color: white;
|
| 109 |
+
box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
h1, h3, p {
|
| 113 |
+
animation: fadeIn 3s ease-out;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
@keyframes bounce {
|
| 117 |
+
0%, 100% {
|
| 118 |
+
transform: translateY(0);
|
| 119 |
+
}
|
| 120 |
+
50% {
|
| 121 |
+
transform: translateY(-10px);
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
@keyframes slideIn {
|
| 126 |
+
0% {
|
| 127 |
+
transform: translateX(-100%);
|
| 128 |
+
}
|
| 129 |
+
100% {
|
| 130 |
+
transform: translateX(0);
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
@keyframes fadeIn {
|
| 135 |
+
0% {
|
| 136 |
+
opacity: 0;
|
| 137 |
+
}
|
| 138 |
+
100% {
|
| 139 |
+
opacity: 1;
|
| 140 |
+
}
|
| 141 |
}
|
| 142 |
"""
|
| 143 |
interface.launch()
|