Open_AI_o1_Hackathon / pages /ai_explanations.py
Ashar086's picture
Update pages/ai_explanations.py
0536b37 verified
raw
history blame contribute delete
471 Bytes
import streamlit as st
from utils.aiml_api_utils import call_aiml_api
def show_ai_explanations():
st.title("Ask AI for Machine Learning Explanations")
# Input field for user to ask an ML question
user_question = st.text_input("Ask a question about machine learning:")
if st.button("Get Explanation"):
# Call the AI/ML API with the user's question
explanation = call_aiml_api(user_question, max_tokens=400)
st.write(explanation)