Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +8 -0
src/streamlit_app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
def calculate_bmi(weight, height_cm):
|
| 4 |
# Convert height from cm to meters
|
|
@@ -20,6 +21,13 @@ def get_category(bmi):
|
|
| 20 |
# App UI
|
| 21 |
st.set_page_config(page_title="FitPlan-AI", page_icon="💪")
|
| 22 |
st.title("💪 FitPlan-AI: Personalized Fitness Profile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
with st.form("fitness_form"):
|
| 25 |
st.header("Personal Information")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from transformers import pipeline
|
| 3 |
|
| 4 |
def calculate_bmi(weight, height_cm):
|
| 5 |
# Convert height from cm to meters
|
|
|
|
| 21 |
# App UI
|
| 22 |
st.set_page_config(page_title="FitPlan-AI", page_icon="💪")
|
| 23 |
st.title("💪 FitPlan-AI: Personalized Fitness Profile")
|
| 24 |
+
def load_model():
|
| 25 |
+
return pipeline(
|
| 26 |
+
"text-generation",
|
| 27 |
+
model="google/flan-t5-base"
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
generator = load_model()
|
| 31 |
|
| 32 |
with st.form("fitness_form"):
|
| 33 |
st.header("Personal Information")
|