sunnynazir commited on
Commit
36ffd86
·
verified ·
1 Parent(s): 8355e64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -4
app.py CHANGED
@@ -1,9 +1,7 @@
1
-
2
  import os
3
  import streamlit as st
4
  from groq import Groq
5
- from transformers
6
- import AutoTokenizer
7
  import faiss
8
  import numpy as np
9
 
@@ -104,6 +102,10 @@ def main():
104
  # Custom styling for the app using markdown
105
  st.markdown("""
106
  <style>
 
 
 
 
107
  .title {
108
  font-size: 40px;
109
  font-weight: bold;
@@ -134,12 +136,35 @@ def main():
134
  st.title("Microcontroller Code Generator", anchor="title")
135
 
136
  # Step 1: Display Custom Image
137
- # Use the image URL from Hugging Face Files Section
138
  image_url = "https://imgur.com/CBm5exE.png"
139
  st.image(image_url, caption="Custom Image", use_container_width=True)
140
 
141
  st.write("Select a microcontroller and provide your code requirements to generate code.")
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  # Sidebar with different selection options for users
144
  with st.sidebar:
145
  st.header("Microcontroller Selection")
 
 
1
  import os
2
  import streamlit as st
3
  from groq import Groq
4
+ from transformers import AutoTokenizer
 
5
  import faiss
6
  import numpy as np
7
 
 
102
  # Custom styling for the app using markdown
103
  st.markdown("""
104
  <style>
105
+ body {
106
+ background: linear-gradient(to right, #ff7e5f, #feb47b, #6a11cb, #2575fc);
107
+ font-family: Arial, sans-serif;
108
+ }
109
  .title {
110
  font-size: 40px;
111
  font-weight: bold;
 
136
  st.title("Microcontroller Code Generator", anchor="title")
137
 
138
  # Step 1: Display Custom Image
139
+ # Use the image URL from Imgur
140
  image_url = "https://imgur.com/CBm5exE.png"
141
  st.image(image_url, caption="Custom Image", use_container_width=True)
142
 
143
  st.write("Select a microcontroller and provide your code requirements to generate code.")
144
 
145
+ # Custom styling for the app with logo in top bar
146
+ st.markdown("""
147
+ <style>
148
+ .top-bar-logo {
149
+ position: absolute;
150
+ top: 0;
151
+ left: 0;
152
+ padding: 10px;
153
+ z-index: 100;
154
+ }
155
+ .stApp {
156
+ padding-top: 50px; /* Adjust this based on your logo size */
157
+ }
158
+ </style>
159
+ """, unsafe_allow_html=True)
160
+
161
+ # Add logo to the top bar using the new Imgur image URL
162
+ st.markdown("""
163
+ <div class="top-bar-logo">
164
+ <img src="https://i.imgur.com/CBm5exE.png" alt="Logo" width="150">
165
+ </div>
166
+ """, unsafe_allow_html=True)
167
+
168
  # Sidebar with different selection options for users
169
  with st.sidebar:
170
  st.header("Microcontroller Selection")