Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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
|
| 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)
|