Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ import requests
|
|
3 |
import os
|
4 |
|
5 |
# Fetch Hugging Face and Groq API keys from secrets
|
6 |
-
|
7 |
Transalate_token = os.getenv('HUGGINGFACE_TOKEN')
|
8 |
Image_Token = os.getenv('HUGGINGFACE_TOKEN')
|
9 |
Content_Token = os.getenv('GROQ_API_KEY')
|
@@ -90,7 +89,46 @@ def generate_image(image_prompt):
|
|
90 |
|
91 |
# Main Streamlit app
|
92 |
def main():
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
st.title("🅰️ℹ️ FusionMind ➡️ Multimodal Generator 🤖")
|
95 |
|
96 |
# Sidebar for temperature and token adjustment
|
@@ -130,4 +168,4 @@ def main():
|
|
130 |
st.image(image_data, caption="Generated Image")
|
131 |
|
132 |
if __name__ == "__main__":
|
133 |
-
main()
|
|
|
3 |
import os
|
4 |
|
5 |
# Fetch Hugging Face and Groq API keys from secrets
|
|
|
6 |
Transalate_token = os.getenv('HUGGINGFACE_TOKEN')
|
7 |
Image_Token = os.getenv('HUGGINGFACE_TOKEN')
|
8 |
Content_Token = os.getenv('GROQ_API_KEY')
|
|
|
89 |
|
90 |
# Main Streamlit app
|
91 |
def main():
|
92 |
+
# Custom CSS for background, borders, and other styling
|
93 |
+
st.markdown(
|
94 |
+
"""
|
95 |
+
<style>
|
96 |
+
body {
|
97 |
+
background-image: url('https://wallpapercave.com/wp/wp4008910.jpg');
|
98 |
+
background-size: cover;
|
99 |
+
}
|
100 |
+
.reportview-container {
|
101 |
+
background: rgba(255, 255, 255, 0.85);
|
102 |
+
padding: 2rem;
|
103 |
+
border-radius: 10px;
|
104 |
+
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
|
105 |
+
}
|
106 |
+
.result-container {
|
107 |
+
border: 2px solid #4CAF50;
|
108 |
+
padding: 20px;
|
109 |
+
border-radius: 10px;
|
110 |
+
margin-top: 20px;
|
111 |
+
animation: fadeIn 2s ease;
|
112 |
+
}
|
113 |
+
@keyframes fadeIn {
|
114 |
+
0% { opacity: 0; }
|
115 |
+
100% { opacity: 1; }
|
116 |
+
}
|
117 |
+
.stButton button {
|
118 |
+
background-color: #4CAF50;
|
119 |
+
color: white;
|
120 |
+
border-radius: 10px;
|
121 |
+
padding: 10px;
|
122 |
+
}
|
123 |
+
.stButton button:hover {
|
124 |
+
background-color: #45a049;
|
125 |
+
transform: scale(1.05);
|
126 |
+
transition: 0.2s ease-in-out;
|
127 |
+
}
|
128 |
+
</style>
|
129 |
+
""", unsafe_allow_html=True
|
130 |
+
)
|
131 |
+
|
132 |
st.title("🅰️ℹ️ FusionMind ➡️ Multimodal Generator 🤖")
|
133 |
|
134 |
# Sidebar for temperature and token adjustment
|
|
|
168 |
st.image(image_data, caption="Generated Image")
|
169 |
|
170 |
if __name__ == "__main__":
|
171 |
+
main()
|