From c67c79e45c821de490557ffd66b8d3b9ad0dff98 Mon Sep 17 00:00:00 2001 From: Hetul Patel Date: Sat, 20 Apr 2024 22:24:05 +0530 Subject: [PATCH] Fix bug which fails push --- .github/workflows/update_leaderboard.yaml | 15 +++++++++------ session_2/challenge/scripts/model.py | 10 +++++----- session_2/challenge/submissions/baseline_copy.py | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update_leaderboard.yaml b/.github/workflows/update_leaderboard.yaml index e7c2652..ca29b76 100644 --- a/.github/workflows/update_leaderboard.yaml +++ b/.github/workflows/update_leaderboard.yaml @@ -1,12 +1,15 @@ name: Update leaderboard on PR Merge. on: - push: - # pull_request: - # branches: - # - development - # types: - # [closed] + pull_request: + branches: + - development + types: + [closed] + +# on: +# pull_request: +# types: [opened, reopened, synchronize] jobs: leaderboard_evaluation: diff --git a/session_2/challenge/scripts/model.py b/session_2/challenge/scripts/model.py index 3296b16..69636e9 100644 --- a/session_2/challenge/scripts/model.py +++ b/session_2/challenge/scripts/model.py @@ -19,9 +19,9 @@ class G4fModel(Model): def generate(self, prompt: str) -> str: """Completes a prompt using gpt-4 for free model.""" - response = g4f.ChatCompletion.create( - model=g4f.models.gpt_4, - messages=[{"role": "user", "content": prompt}], - ) - # response = "yes" + # response = g4f.ChatCompletion.create( + # model=g4f.models.gpt_4, + # messages=[{"role": "user", "content": prompt}], + # ) + response = "yes" return response diff --git a/session_2/challenge/submissions/baseline_copy.py b/session_2/challenge/submissions/baseline_copy.py index c8f6b3e..0ad174f 100644 --- a/session_2/challenge/submissions/baseline_copy.py +++ b/session_2/challenge/submissions/baseline_copy.py @@ -12,7 +12,7 @@ def build_prompt(self, job_description: str) -> str: prompt = f""" Say "YES" if the given job description is suitable for - a freshers other wise say "NO". + a freshers other wise say "NO" {job_description}.