MartinKosela commited on
Commit
7dc63d1
·
1 Parent(s): 90b66df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -61,19 +61,18 @@ st.write("")
61
  st.markdown("<h4 style='font-size:20px;'>Outline Your Application's Functionality:</h4>", unsafe_allow_html=True)
62
  description = st.text_area("", key="app_description")
63
 
64
- # Using a placeholder for the "Next" button to always display it
65
  if description or 'next_clicked' in st.session_state:
66
  if st.button("Next", key="next_to_dataset"):
67
  st.session_state['next_clicked'] = True
68
  st.session_state.show_dataset_description = True
69
 
70
-
71
-
72
  if 'show_dataset_description' in st.session_state and st.session_state.show_dataset_description:
73
  st.markdown("<h4 style='font-size:20px;'>Detail Your Model's Training Dataset:</h4>", unsafe_allow_html=True)
74
- dataset_description = st.text_area("", key="dataset_description", on_change=lambda: st.session_state.__setitem__('show_next_button', True))
75
- if dataset_description:
 
76
  if st.button("Recommend AI Model", key="recommend_model_button"):
 
77
  recommended_model = recommend_ai_model_via_gpt(description)
78
  st.subheader(f"Recommended: {recommended_model}")
79
  explanation = explain_recommendation(recommended_model)
 
61
  st.markdown("<h4 style='font-size:20px;'>Outline Your Application's Functionality:</h4>", unsafe_allow_html=True)
62
  description = st.text_area("", key="app_description")
63
 
 
64
  if description or 'next_clicked' in st.session_state:
65
  if st.button("Next", key="next_to_dataset"):
66
  st.session_state['next_clicked'] = True
67
  st.session_state.show_dataset_description = True
68
 
 
 
69
  if 'show_dataset_description' in st.session_state and st.session_state.show_dataset_description:
70
  st.markdown("<h4 style='font-size:20px;'>Detail Your Model's Training Dataset:</h4>", unsafe_allow_html=True)
71
+ dataset_description = st.text_area("", key="dataset_description")
72
+
73
+ if dataset_description or 'recommend_clicked' in st.session_state:
74
  if st.button("Recommend AI Model", key="recommend_model_button"):
75
+ st.session_state['recommend_clicked'] = True
76
  recommended_model = recommend_ai_model_via_gpt(description)
77
  st.subheader(f"Recommended: {recommended_model}")
78
  explanation = explain_recommendation(recommended_model)