Ashar086 commited on
Commit
0536b37
·
verified ·
1 Parent(s): fd7ad95

Update pages/ai_explanations.py

Browse files
Files changed (1) hide show
  1. pages/ai_explanations.py +4 -2
pages/ai_explanations.py CHANGED
@@ -1,11 +1,13 @@
1
  import streamlit as st
2
- from utils.openai_utils import get_ai_explanation
3
 
4
  def show_ai_explanations():
5
  st.title("Ask AI for Machine Learning Explanations")
6
 
 
7
  user_question = st.text_input("Ask a question about machine learning:")
8
 
9
  if st.button("Get Explanation"):
10
- explanation = get_ai_explanation(user_question)
 
11
  st.write(explanation)
 
1
  import streamlit as st
2
+ from utils.aiml_api_utils import call_aiml_api
3
 
4
  def show_ai_explanations():
5
  st.title("Ask AI for Machine Learning Explanations")
6
 
7
+ # Input field for user to ask an ML question
8
  user_question = st.text_input("Ask a question about machine learning:")
9
 
10
  if st.button("Get Explanation"):
11
+ # Call the AI/ML API with the user's question
12
+ explanation = call_aiml_api(user_question, max_tokens=400)
13
  st.write(explanation)