Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import openai
|
| 3 |
os.environ["OPENAI_API_KEY"] = os.getenv('openai')
|
| 4 |
-
|
| 5 |
|
| 6 |
def get_completion(prompt, model="gpt-3.5-turbo"):
|
| 7 |
messages = [{"role": "user", "content": prompt}]
|
|
@@ -23,8 +23,6 @@ def evaluate_answer(question,answer,context):
|
|
| 23 |
return response
|
| 24 |
|
| 25 |
|
| 26 |
-
|
| 27 |
-
gemini_model = ChatGoogleGenerativeAI(model = "gemini-pro")
|
| 28 |
def generate_multiple_questions(topic):
|
| 29 |
prompt_sum = f'''Given the {topic}, generate atleast 10 multiple choice questions that test the users understanding of the topic. Here is the format:
|
| 30 |
|
|
|
|
| 1 |
import os
|
| 2 |
import openai
|
| 3 |
os.environ["OPENAI_API_KEY"] = os.getenv('openai')
|
| 4 |
+
|
| 5 |
|
| 6 |
def get_completion(prompt, model="gpt-3.5-turbo"):
|
| 7 |
messages = [{"role": "user", "content": prompt}]
|
|
|
|
| 23 |
return response
|
| 24 |
|
| 25 |
|
|
|
|
|
|
|
| 26 |
def generate_multiple_questions(topic):
|
| 27 |
prompt_sum = f'''Given the {topic}, generate atleast 10 multiple choice questions that test the users understanding of the topic. Here is the format:
|
| 28 |
|