Spaces:
Running
Running
Update hackaprompt/gradio_app.py
Browse files
hackaprompt/gradio_app.py
CHANGED
@@ -48,10 +48,9 @@ def generate(prompt, level, model, session_id):
|
|
48 |
"""
|
49 |
# uncomment for local debugging
|
50 |
# import os; openai_api_key = os.getenv("OPENAI_API_KEY")
|
51 |
-
openai_api_key = os.getenv("OPENAI_API_KEY")
|
52 |
# TODO: move this logic elsewhere
|
53 |
if model in ["text-davinci-003", "gpt-3.5-turbo"]:
|
54 |
-
completer = get_completer(model
|
55 |
else:
|
56 |
completer = get_completer(model)
|
57 |
evaluator = get_evaluator(level=level, completer=completer)
|
|
|
48 |
"""
|
49 |
# uncomment for local debugging
|
50 |
# import os; openai_api_key = os.getenv("OPENAI_API_KEY")
|
|
|
51 |
# TODO: move this logic elsewhere
|
52 |
if model in ["text-davinci-003", "gpt-3.5-turbo"]:
|
53 |
+
completer = get_completer(model)
|
54 |
else:
|
55 |
completer = get_completer(model)
|
56 |
evaluator = get_evaluator(level=level, completer=completer)
|