js02vel commited on
Commit
e7ba5d7
·
verified ·
1 Parent(s): f91adf8

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +20 -8
src/streamlit_app.py CHANGED
@@ -1,3 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
  # 1. Basic Configuration
@@ -14,12 +29,10 @@ st.markdown("""
14
  background-position: center;
15
  background-attachment: fixed;
16
  }
17
-
18
  /* Hide the "Press Enter to submit form" hint globally */
19
  [data-testid="InputInstructions"] {
20
  display: none !important;
21
  }
22
-
23
  /* Form Container Polish */
24
  div[data-testid="stForm"] {
25
  background-color: rgba(255, 255, 255, 0.98) !important;
@@ -28,7 +41,6 @@ st.markdown("""
28
  border: none !important;
29
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
30
  }
31
-
32
  /* --- FONT SIZE UPDATES --- */
33
  /* Main Title (FitPlan AI) */
34
  .main-title {
@@ -40,7 +52,6 @@ st.markdown("""
40
  text-shadow: 3px 3px 6px rgba(0,0,0,0.9);
41
  font-family: 'Helvetica Neue', sans-serif;
42
  }
43
-
44
  /* Subtitle (Your personalized gym companion) */
45
  .sub-title {
46
  color: #E0E0E0 !important;
@@ -51,7 +62,6 @@ st.markdown("""
51
  font-style: italic;
52
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
53
  }
54
-
55
  /* Form Section Headers (Orange) */
56
  .form-header {
57
  color: #f97316 !important;
@@ -60,14 +70,12 @@ st.markdown("""
60
  text-transform: uppercase;
61
  letter-spacing: 1px;
62
  }
63
-
64
  /* Labels for inputs */
65
  label p {
66
  font-size: 18px !important;
67
  color: #1e293b !important;
68
  font-weight: 600 !important;
69
  }
70
-
71
  /* Button Styling */
72
  .stButton > button {
73
  width: 100%;
@@ -147,4 +155,8 @@ if submit:
147
  with c2:
148
  st.markdown(f"### Status: :{color}[{cat}]")
149
 
150
- st.info(f"**Goal:** {goal} | **Experience:** {level}")
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ def load_model():
5
+
6
+ return pipeline(
7
+
8
+ "text-generation",
9
+
10
+ model="google/flan-t5-base"
11
+
12
+ )
13
+
14
+ generator = load_model()
15
+
16
  import streamlit as st
17
 
18
  # 1. Basic Configuration
 
29
  background-position: center;
30
  background-attachment: fixed;
31
  }
 
32
  /* Hide the "Press Enter to submit form" hint globally */
33
  [data-testid="InputInstructions"] {
34
  display: none !important;
35
  }
 
36
  /* Form Container Polish */
37
  div[data-testid="stForm"] {
38
  background-color: rgba(255, 255, 255, 0.98) !important;
 
41
  border: none !important;
42
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
43
  }
 
44
  /* --- FONT SIZE UPDATES --- */
45
  /* Main Title (FitPlan AI) */
46
  .main-title {
 
52
  text-shadow: 3px 3px 6px rgba(0,0,0,0.9);
53
  font-family: 'Helvetica Neue', sans-serif;
54
  }
 
55
  /* Subtitle (Your personalized gym companion) */
56
  .sub-title {
57
  color: #E0E0E0 !important;
 
62
  font-style: italic;
63
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
64
  }
 
65
  /* Form Section Headers (Orange) */
66
  .form-header {
67
  color: #f97316 !important;
 
70
  text-transform: uppercase;
71
  letter-spacing: 1px;
72
  }
 
73
  /* Labels for inputs */
74
  label p {
75
  font-size: 18px !important;
76
  color: #1e293b !important;
77
  font-weight: 600 !important;
78
  }
 
79
  /* Button Styling */
80
  .stButton > button {
81
  width: 100%;
 
155
  with c2:
156
  st.markdown(f"### Status: :{color}[{cat}]")
157
 
158
+ st.info(f"*Goal:* {goal} | *Experience:* {level}")
159
+
160
+
161
+
162
+