Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -1
src/streamlit_app.py
CHANGED
|
@@ -1,10 +1,16 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
-
import streamlit as st
|
| 4 |
|
| 5 |
st.set_page_config(page_title="FitPlan AI - BMI Calculator", page_icon="💪")
|
| 6 |
|
| 7 |
st.title("💪 FitPlan AI - Fitness Profile & BMI Calculator")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
st.write("Fill in your details to calculate your BMI and fitness category.")
|
| 10 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
|
|
|
| 3 |
|
| 4 |
st.set_page_config(page_title="FitPlan AI - BMI Calculator", page_icon="💪")
|
| 5 |
|
| 6 |
st.title("💪 FitPlan AI - Fitness Profile & BMI Calculator")
|
| 7 |
+
def load_model():
|
| 8 |
+
return pipeline(
|
| 9 |
+
"text-generation",
|
| 10 |
+
model="google/flan-t5-base"
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
generator = load_model()
|
| 14 |
|
| 15 |
st.write("Fill in your details to calculate your BMI and fitness category.")
|
| 16 |
|