| import json | |
| import gradio as gr | |
| from langchain.chat_models import ChatOpenAI | |
| # Load the LangFlow project | |
| with open("resume_optimizer.json", "r") as f: | |
| flow = json.load(f) | |
| # Initialize the AI model | |
| llm = ChatOpenAI(model_name="gpt-4") | |
| def analyze_resume(resume_text): | |
| prompt = f"Analyze this resume and provide feedback: {resume_text}" | |
| response = llm(prompt) | |
| return response | |
| app = gr.Interface(fn=analyze_resume, inputs="text", outputs="text") | |
| app.launch() | |