I decided to try this out, I have a pretty sweet Streamlit app that I can use as a template. Each app is going to be educational at its core and will have some sort of AI API call. I’ll add each to Github. Warning: It uses OpenAI GPT-4o by default, If you have the Ollama models listed downloaded locally, you can use these app’s without wifi.
100 Streamlit Apps
Analyzing your current app, which serves as a programming teacher AI, there’s immense potential to expand into various educational domains. Here are 100 unique educational app ideas that leverage AI to enhance learning experiences:
- Math Tutor AI: Personalized assistance in solving math problems across different levels.
- Language Learning Assistant: AI-powered conversational practice for new languages.
- History Companion: Interactive timelines and explanations of historical events.
- Science Experiment Simulator: Virtual lab experiments guided by AI.
- ComedyWriter: Natural Born comedian, hilarious bit Writer by AI.
- Writing Coach: Real-time feedback on writing style, grammar, and structure.
- Public Speaking Trainer: AI that listens and provides feedback on speeches.
- Career Guidance Counselor: Personalized career advice based on interests and skills.
- Financial Literacy Educator: Interactive modules on budgeting, investing, and economics.
- Coding Challenge Generator: Customized coding problems to practice programming skills.
- Philosophy Discussant: Debates and discussions on philosophical topics.
- Environmental Awareness App: Educational content on sustainability and ecology.
- Medical Terminology Trainer: Learning app for medical students to memorize terms.
- Psychology Concepts Tutor: Explanations of psychological theories and practices.
- Astronomy Guide: Virtual exploration of the universe with educational content.
- Chemistry Equation Balancer: Assistance in understanding and balancing chemical equations.
- Biology Learning Assistant: Interactive lessons on anatomy, genetics, and more.
- Geography Explorer: Educational tours of countries, cultures, and geographical features.
- Ethics Debate AI: Discussions on ethical dilemmas and moral reasoning.
- SAT/ACT Prep Assistant: Practice questions and strategies for standardized tests.
- Literature Analysis Helper: Insights into themes, motifs, and character development in literature.
- Logic Puzzle Generator: Brain teasers and puzzles to enhance logical thinking.
- Vocabulary Builder: Daily words and exercises to expand vocabulary.
- Project Management Coach: Lessons on methodologies like Agile and Scrum.
- Nutrition Educator: Information on healthy eating and diet planning.
- Entrepreneurship Mentor: Guidance on starting and managing a business.
- Legal Studies Assistant: Explanations of legal concepts and case studies.
- Foreign Policy Analyst: Discussions on international relations and policies.
- Cultural Immersion App: Learn about traditions, languages, and customs of different cultures.
- Personal Fitness Trainer: Customized workout plans and exercise guidance.
- Mental Health Awareness App: Educational content on mental well-being and coping strategies.
- Blockchain and Cryptocurrency Tutor: Lessons on decentralized technologies and economics.
- Art History Companion: Exploration of art movements and famous works.
- Robotics and AI Educator: Introduction to robotics, AI principles, and applications.
- Engineering Concepts Tutor: Lessons on mechanical, electrical, and civil engineering principles.
- Climate Change Awareness: Educational modules on climate science and action steps.
- Data Science and Analytics Coach: Tutorials on data analysis, statistics, and machine learning.
- Cooking Instructor AI: Step-by-step recipes and culinary techniques.
- Cybersecurity Awareness App: Lessons on online safety and data protection.
- Resume and Interview Prep Assistant: Tips and practice for job applications and interviews.
- Time Management Coach: Strategies for productivity and organization.
- Investment and Stock Market Educator: Basics of investing and market analysis.
- DIY and Crafts Guide: Instructions and ideas for creative projects.
- Photography Tutor: Lessons on composition, lighting, and camera settings.
- Film Studies Companion: Analysis of cinematic techniques and film history.
- Architecture Learning Assistant: Introduction to architectural styles and design principles.
- Poetry Writing Coach: Guidance on poetic forms, styles, and expression.
- Pet Care Educator: Information on animal care, training, and health.
- Gardening Assistant: Tips on plant care, landscaping, and horticulture.
- Travel Planner AI: Cultural and logistical information for travelers.
- Special Education Assistant: Resources for learning differences and accessibility.
- Ethnic Studies Educator: Exploration of ethnic histories and contributions.
- Gender Studies Companion: Discussions on gender theory and social dynamics.
- Social Justice Awareness App: Educational content on equality and activism.
- Mythology Guide: Stories and analysis of myths from around the world.
- Parenting Educator: Advice and resources for child development and parenting strategies.
- Renewable Energy Tutor: Lessons on sustainable energy sources and technologies.
- Handwriting Improvement Coach: Exercises to enhance penmanship.
- Sign Language Learning App: Interactive lessons on ASL or other sign languages.
- Chess Tutor: Strategies and puzzles to improve chess skills.
- Auto Mechanics Educator: Basics of car maintenance and repair.
- Critical Thinking Coach: Activities to enhance reasoning and analytical skills.
- Ethnobotany Guide: Information on the relationship between people and plants.
- Marine Biology Assistant: Exploration of ocean life and ecosystems.
- Cognitive Science Tutor: Lessons on brain functions and cognitive processes.
- Aeronautics Educator: Introduction to flight principles and aerospace engineering.
- Statistics and Probability Tutor: Interactive problems and explanations.
- Sociology Companion: Discussions on social structures and relationships.
- Anthropology Assistant: Studies on human societies and cultural development.
- Forensic Science Educator: Insights into crime scene investigation techniques.
- Genetics Tutor: Lessons on DNA, heredity, and genetic technologies.
- Meteorology Guide: Understanding weather patterns and forecasting.
- Veterinary Science Assistant: Education on animal health and veterinary practices.
- Personal Finance Manager: Tools and education for managing personal finances.
- Emotional Intelligence Coach: Activities to enhance self-awareness and empathy.
- Social Media Literacy App: Education on responsible use of social platforms.
- Fashion Design Tutor: Lessons on design principles and garment creation.
- Renewable Agriculture Educator: Sustainable farming practices and food systems.
- Urban Planning Assistant: Concepts of city planning and development.
- Quantum Physics Tutor: Simplified explanations of quantum mechanics.
- Epidemiology Educator: Understanding disease spread and public health.
- Acoustic Guitar Lessons: Step-by-step tutorials for learning guitar.
- Game Theory Tutor: Lessons on strategic decision-making models.
- Web Development Assistant: Interactive coding for front-end and back-end development.
- Mobile App Development Tutor: Guidance on creating apps for iOS and Android.
- Disaster Preparedness Educator: Information on emergency planning and response.
- Ethnomusicology Guide: Study of music in cultural contexts.
- Color Theory Tutor: Lessons on color relationships and design applications.
- Criminology Assistant: Exploration of criminal behavior and justice systems.
- Astronautics Educator: Lessons on space travel and exploration technologies.
- Animal Behavior Tutor: Understanding animal psychology and behavior patterns.
- Culinary History Companion: Exploration of food history and cultural dishes.
- Literacy Tutor for Dyslexia: Specialized reading assistance for dyslexic learners.
- Blockchain Development Assistant: Coding smart contracts and blockchain apps.
- Voice Training Coach: Exercises for improving vocal skills and clarity.
- Event Planning Assistant: Guidance on organizing and managing events.
- Augmented Reality Learning: Educational content delivered via AR experiences.
- Mindfulness and Meditation Guide: Techniques for mental well-being.
- Renewable Materials Educator: Information on sustainable materials and design.
- Secret.
Here is the original Streamlit app I used, a java programming educational buddy:
import streamlit as st
import ollama
import time
import json
import os
from datetime import datetime
from openai import OpenAI
# List of available models
MODELS = [
"gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-3.5-turbo", # OpenAI models
"llama3.1:8b", "gemma2:2b", "mistral-nemo:latest", "phi3:latest", # Ollama models
]
# Programming categories for an intro course
PROGRAMMING_CATEGORIES = [
"Variables and Data Types", "Control Structures", "Functions",
"Data Structures", "Object-Oriented Programming", "File I/O",
"Error Handling", "Basic Algorithms", "Debugging",
"Version Control", "Command Line Basics", "IDE Usage"
]
def get_ai_response(messages, model):
if model.startswith("gpt-"):
return get_openai_response(messages, model)
else:
return get_ollama_response(messages, model)
def get_openai_response(messages, model):
client = OpenAI()
try:
response = client.chat.completions.create(
model=model,
messages=messages
)
return response.choices[0].message.content, response.usage.prompt_tokens, response.usage.completion_tokens
except Exception as e:
st.error(f"Error: {str(e)}")
return None, 0, 0
def get_ollama_response(messages, model):
try:
response = ollama.chat(
model=model,
messages=messages
)
return response['message']['content'], response['prompt_eval_count'], response['eval_count']
except Exception as e:
st.error(f"Error: {str(e)}")
return None, 0, 0
def stream_response(messages, model):
if model.startswith("gpt-"):
return stream_openai_response(messages, model)
else:
return stream_ollama_response(messages, model)
def stream_openai_response(messages, model):
client = OpenAI()
try:
stream = client.chat.completions.create(
model=model,
messages=messages,
stream=True
)
return stream
except Exception as e:
st.error(f"Error: {str(e)}")
return None
def stream_ollama_response(messages, model):
try:
stream = ollama.chat(
model=model,
messages=messages,
stream=True
)
return stream
except Exception as e:
st.error(f"Error: {str(e)}")
return None
def save_conversation(messages, filename):
conversation = {
"timestamp": datetime.now().isoformat(),
"messages": messages
}
os.makedirs('conversations', exist_ok=True)
file_path = os.path.join('conversations', filename)
try:
if os.path.exists(file_path):
with open(file_path, 'r') as f:
conversations = json.load(f)
else:
conversations = []
except json.JSONDecodeError:
conversations = []
conversations.append(conversation)
with open(file_path, 'w') as f:
json.dump(conversations, f, indent=2)
def load_conversations(uploaded_file):
if uploaded_file is not None:
try:
conversations = json.loads(uploaded_file.getvalue().decode("utf-8"))
return conversations
except json.JSONDecodeError:
st.error(f"Error decoding the uploaded file. The file may be corrupted or not in JSON format.")
return []
else:
st.warning("No file was uploaded.")
return []
def main():
st.set_page_config(layout="wide")
st.title("Programming Teacher AI")
if "messages" not in st.session_state:
st.session_state.messages = []
if "token_count" not in st.session_state:
st.session_state.token_count = {"prompt": 0, "completion": 0}
if "user_name" not in st.session_state:
st.session_state.user_name = "Student"
st.session_state.user_name = st.text_input("Enter your name:", value=st.session_state.user_name)
st.sidebar.title("Programming Learning Options")
model = st.sidebar.selectbox("Choose a model", MODELS)
custom_instructions = st.sidebar.text_area("Custom Instructions",
"""You are a knowledgeable and patient Java Programming Teacher AI. Your role is to help students learn programming concepts, focusing on beginners in an introductory programming course. You should provide comprehensive information, ask relevant questions, and offer clear explanations across all fundamental programming topics.
Your knowledge spans:
Variables and Data Types, Control Structures, Functions, Data Structures, Object-Oriented Programming, File I/O, Error Handling, Basic Algorithms, Debugging, Version Control, Command Line Basics, and IDE Usage.
For each category, you should be able to:
1. Provide detailed explanations of key concepts
2. Offer coding examples and exercises that demonstrate the concepts
3. Explain best practices and common pitfalls in programming
4. Break down complex topics into simpler, more digestible parts
5. Relate programming concepts to real-world applications
6. Guide students through problem-solving processes
When interacting:
- Adapt your explanations to the student's level of understanding
- Use clear, concise language while maintaining technical accuracy
- Encourage critical thinking by asking follow-up questions
- Provide positive reinforcement and motivation
- Offer practical coding tips and debugging strategies
- Suggest resources for further learning on specific topics
Remember, your goal is to be a comprehensive and supportive resource for learning programming, covering all aspects of an introductory course and helping students build their coding skills and problem-solving abilities.""")
category_focus = st.sidebar.multiselect("Focus on specific categories", PROGRAMMING_CATEGORIES, default=PROGRAMMING_CATEGORIES)
theme = st.sidebar.selectbox("Choose a theme", ["Light", "Dark"])
if theme == "Dark":
st.markdown("""
<style>
.stApp {
background-color: #1E1E1E;
color: white;
}
</style>
""", unsafe_allow_html=True)
if st.sidebar.button("Clear Chat History"):
st.session_state.messages = []
st.session_state.token_count = {"prompt": 0, "completion": 0}
st.sidebar.subheader("Conversation Management")
save_name = st.sidebar.text_input("Save conversation as:", "programming_learning_conversation.json")
if st.sidebar.button("Save Conversation"):
save_conversation(st.session_state.messages, save_name)
st.sidebar.success(f"Conversation saved to conversations/{save_name}")
st.sidebar.subheader("Load Conversation")
uploaded_file = st.sidebar.file_uploader("Choose a file to load conversations", type=["json"], key="conversation_uploader")
if uploaded_file is not None:
try:
conversations = load_conversations(uploaded_file)
if conversations:
st.sidebar.success(f"Loaded {len(conversations)} conversations from the uploaded file")
selected_conversation = st.sidebar.selectbox(
"Select a conversation to load",
range(len(conversations)),
format_func=lambda i: conversations[i]['timestamp']
)
if st.sidebar.button("Load Selected Conversation"):
st.session_state.messages = conversations[selected_conversation]['messages']
st.sidebar.success("Conversation loaded successfully!")
else:
st.sidebar.error("No valid conversations found in the uploaded file.")
except Exception as e:
st.sidebar.error(f"Error loading conversations: {str(e)}")
for message in st.session_state.messages:
with st.chat_message(message["role"]):
st.markdown(message["content"])
if prompt := st.chat_input("Ask a question about programming:"):
st.session_state.messages.append({"role": "user", "content": f"{st.session_state.user_name}: {prompt}"})
with st.chat_message("user"):
st.markdown(f"{st.session_state.user_name}: {prompt}")
category_instruction = f"Focus on the following programming categories: {', '.join(category_focus)}. "
ai_messages = [
{"role": "system", "content": custom_instructions + category_instruction},
{"role": "system", "content": "Remember to provide code examples, explain concepts clearly, and encourage hands-on practice when appropriate."},
] + st.session_state.messages
with st.chat_message("assistant"):
message_placeholder = st.empty()
full_response = ""
for chunk in stream_response(ai_messages, model):
if chunk:
if model.startswith("gpt-"):
full_response += chunk.choices[0].delta.content or ""
else:
full_response += chunk['message']['content']
message_placeholder.markdown(full_response + "▌")
time.sleep(0.05)
message_placeholder.markdown(full_response)
st.session_state.messages.append({"role": "assistant", "content": full_response})
_, prompt_tokens, completion_tokens = get_ai_response(ai_messages, model)
st.session_state.token_count["prompt"] += prompt_tokens
st.session_state.token_count["completion"] += completion_tokens
st.sidebar.subheader("Token Usage")
st.sidebar.write(f"Prompt tokens: {st.session_state.token_count['prompt']}")
st.sidebar.write(f"Completion tokens: {st.session_state.token_count['completion']}")
st.sidebar.write(f"Total tokens: {sum(st.session_state.token_count.values())}")
if __name__ == "__main__":
main()