nsgupta1 commited on
Commit
8097a9d
·
verified ·
1 Parent(s): 16930b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  import numpy as np
4
  from utils.constants import metadata_path, embeddings_path
5
- from utils.embeddings_utils import load_model
6
  from question_handler import find_top_question, generate_detailed_prompt, extract_code_and_test_case
7
  from utils.openai_client import generate_response
8
  from code_executor import execute_code
@@ -33,7 +33,7 @@ if generate_button:
33
 
34
  # Create a query from user inputs and find the most relevant question
35
  query = f"{company} {difficulty} {topic}"
36
- top_question = find_top_question(query, metadata, embeddings, model)
37
 
38
  # Prepare a detailed prompt for GPT using the top question's details
39
  detailed_prompt = generate_detailed_prompt(top_question)
 
2
  import pandas as pd
3
  import numpy as np
4
  from utils.constants import metadata_path, embeddings_path
5
+ from embeddings_utils import load_model
6
  from question_handler import find_top_question, generate_detailed_prompt, extract_code_and_test_case
7
  from utils.openai_client import generate_response
8
  from code_executor import execute_code
 
33
 
34
  # Create a query from user inputs and find the most relevant question
35
  query = f"{company} {difficulty} {topic}"
36
+ top_question = find_top_question(query, metadata, embeddings)
37
 
38
  # Prepare a detailed prompt for GPT using the top question's details
39
  detailed_prompt = generate_detailed_prompt(top_question)