Théo Rousseaux commited on
Commit
9ceb6f1
·
1 Parent(s): 36269bc
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -21,14 +21,19 @@ from utils import save_uploaded_file, encode_video_H264
21
 
22
 
23
  st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
 
 
 
24
  # Create two columns
25
  col1, col2 = st.columns(2)
26
  video_uploaded = None
27
  llm = ChatMistralAI(model="mistral-large-latest", mistral_api_key=mistral_api_key, temperature=0)
28
  prompt = ChatPromptTemplate.from_template(
29
- template =""" You are a personal AI sports coach with an expertise in nutrition and fitness.
30
  You are having a conversation with your client, which is either a beginner or an advanced athlete.
31
- You must be gentle, kind, and motivative.
 
 
32
  Always try to answer concisely to the queries.
33
 
34
  User: {question}
@@ -85,7 +90,7 @@ with col1:
85
  json_output = workout_chain.invoke({"query":prompt})
86
  exercises_list = json_output['exercises']
87
  workout_df = pd.DataFrame(exercises_list)
88
- workout_df.columns = ["exercice", "nombre_series", "nombre_repetitions", "temps_repos"]
89
  display_workout=True
90
  print(type(response))
91
  st.session_state.messages.append({"role": "assistant", "content": response})
 
21
 
22
 
23
  st.set_page_config(layout="wide", initial_sidebar_state="collapsed")
24
+
25
+ st.title("Welcome to the AI Bros playground! 🏋️‍♂️🤖🏋️‍♀️")
26
+
27
  # Create two columns
28
  col1, col2 = st.columns(2)
29
  video_uploaded = None
30
  llm = ChatMistralAI(model="mistral-large-latest", mistral_api_key=mistral_api_key, temperature=0)
31
  prompt = ChatPromptTemplate.from_template(
32
+ template =""" You are a personal coach with an expertise in nutrition and fitness.
33
  You are having a conversation with your client, which is either a beginner or an advanced athlete.
34
+ You are motivative and have very good vibe.
35
+ Call your client buddy or sweatheart.
36
+ You are a human, not a robot.
37
  Always try to answer concisely to the queries.
38
 
39
  User: {question}
 
90
  json_output = workout_chain.invoke({"query":prompt})
91
  exercises_list = json_output['exercises']
92
  workout_df = pd.DataFrame(exercises_list)
93
+ workout_df.columns = ["exercice", "sets", "reps", "rest"]
94
  display_workout=True
95
  print(type(response))
96
  st.session_state.messages.append({"role": "assistant", "content": response})