import streamlit as st import openai import os # Securely fetch the OpenAI API key openai.api_key = os.getenv("OPENAI_API_KEY") KNOWN_MODELS = [ # General ML models "Neural Networks", "Decision Trees", "Support Vector Machines", "Random Forests", "Linear Regression", "Reinforcement Learning", "Logistic Regression", "k-Nearest Neighbors", "Naive Bayes", "Gradient Boosting Machines", "Regularization Techniques", "Ensemble Methods", "Time Series Analysis", # Deep Learning models "Deep Learning", "Convolutional Neural Networks", "Recurrent Neural Networks", "Transformer Models", "Generative Adversarial Networks", "Autoencoders", "Bidirectional LSTM", "Residual Networks (ResNets)", "Variational Autoencoders", # Computer Vision models and techniques "Object Detection (e.g., YOLO, SSD)", "Semantic Segmentation", "Image Classification", "Face Recognition", "Optical Character Recognition (OCR)", "Pose Estimation", "Style Transfer", "Image-to-Image Translation", "Image Generation", "Capsule Networks", # NLP models and techniques "BERT", "GPT", "ELMo", "T5", "Word2Vec", "Doc2Vec", "Topic Modeling", "Sentiment Analysis", "Text Classification", "Machine Translation", "Speech Recognition", "Sequence-to-Sequence Models", "Attention Mechanisms", "Named Entity Recognition", "Text Summarization" ] def recommend_ai_model_via_gpt(description): messages = [{"role": "user", "content": description}] response = openai.ChatCompletion.create(model="gpt-4", messages=messages) return response['choices'][0]['message']['content'].strip() def explain_recommendation(model_name): messages = [{"role": "user", "content": f"Why is {model_name} the best choice for my application?"}] response = openai.ChatCompletion.create(model="gpt-4", messages=messages) return response['choices'][0]['message']['content'].strip() # Streamlit UI st.image("./A8title.png") st.title('Find the best model for your GenAI App') st.write("") st.markdown("