Spaces:
Running
Running
add gpt4o, remove password if env vars not set
Browse files- hackaprompt/completers.py +3 -0
- hackaprompt/gradio_app.py +6 -3
hackaprompt/completers.py
CHANGED
|
@@ -144,8 +144,11 @@ class ClaudeCompletor(TextCompletion):
|
|
| 144 |
|
| 145 |
completers = {
|
| 146 |
"gpt-3.5-turbo": ChatGPTCompletor,
|
|
|
|
|
|
|
| 147 |
"gpt-3.5-turbo-0125": ChatGPTCompletor,
|
| 148 |
"gpt-4-0613": ChatGPTCompletor,
|
|
|
|
| 149 |
}
|
| 150 |
|
| 151 |
|
|
|
|
| 144 |
|
| 145 |
completers = {
|
| 146 |
"gpt-3.5-turbo": ChatGPTCompletor,
|
| 147 |
+
"gpt-4o": ChatGPTCompletor,
|
| 148 |
+
"gpt-4": ChatGPTCompletor,
|
| 149 |
"gpt-3.5-turbo-0125": ChatGPTCompletor,
|
| 150 |
"gpt-4-0613": ChatGPTCompletor,
|
| 151 |
+
"gpt-4o-2024-05-13": ChatGPTCompletor,
|
| 152 |
}
|
| 153 |
|
| 154 |
|
hackaprompt/gradio_app.py
CHANGED
|
@@ -18,9 +18,9 @@ logging.basicConfig(level=logging.INFO)
|
|
| 18 |
logger = logging.getLogger(__name__)
|
| 19 |
|
| 20 |
|
| 21 |
-
DEFAULT_MODEL = "gpt-3.5-turbo
|
| 22 |
NUM_LEVELS = 3 # 11
|
| 23 |
-
AVAILABLE_COMPLETERS = ["gpt-3.5-turbo
|
| 24 |
|
| 25 |
|
| 26 |
def format_evaluation(correct: bool) -> str:
|
|
@@ -181,4 +181,7 @@ with gr.Blocks() as demo:
|
|
| 181 |
)
|
| 182 |
|
| 183 |
USERNAME, PASSWORD = os.getenv("APP_USERNAME"), os.getenv("APP_PASSWORD")
|
| 184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
logger = logging.getLogger(__name__)
|
| 19 |
|
| 20 |
|
| 21 |
+
DEFAULT_MODEL = "gpt-3.5-turbo"
|
| 22 |
NUM_LEVELS = 3 # 11
|
| 23 |
+
AVAILABLE_COMPLETERS = ["gpt-3.5-turbo", "gpt-4o"]
|
| 24 |
|
| 25 |
|
| 26 |
def format_evaluation(correct: bool) -> str:
|
|
|
|
| 181 |
)
|
| 182 |
|
| 183 |
USERNAME, PASSWORD = os.getenv("APP_USERNAME"), os.getenv("APP_PASSWORD")
|
| 184 |
+
if USERNAME and PASSWORD:
|
| 185 |
+
demo.launch(auth=(USERNAME, PASSWORD))
|
| 186 |
+
else:
|
| 187 |
+
demo.launch()
|