Spaces:
Running
Running
Update pages/ai_explanations.py
Browse files- pages/ai_explanations.py +4 -2
pages/ai_explanations.py
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
-
from utils.
|
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 |
-
|
|
|
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)
|