Spaces:
Runtime error
Runtime error
Update app/openai_chat_completion.py
Browse files
app/openai_chat_completion.py
CHANGED
@@ -42,7 +42,7 @@ class OpenAIChatCompletions:
|
|
42 |
|
43 |
|
44 |
# function to use test data to predict completions
|
45 |
-
def predict_jsonl(self, path_or_buf='
|
46 |
jsonObj = pd.read_json(path_or_buf=path_or_buf, lines=True)
|
47 |
if n_samples is not None:
|
48 |
jsonObj = jsonObj.sample(n_samples, random_state=42)
|
@@ -71,6 +71,6 @@ class OpenAIChatCompletions:
|
|
71 |
|
72 |
# a method that samples n rows from a jsonl file, returning a pandas dataframe
|
73 |
@staticmethod
|
74 |
-
def _sample_jsonl(path_or_buf='
|
75 |
jsonObj = pd.read_json(path_or_buf=path_or_buf, lines=True)
|
76 |
return jsonObj.sample(n_samples, random_state=42)
|
|
|
42 |
|
43 |
|
44 |
# function to use test data to predict completions
|
45 |
+
def predict_jsonl(self, path_or_buf='data-cleaning-llm/data/cookies_test.jsonl', n_samples=None, n_shot=None):
|
46 |
jsonObj = pd.read_json(path_or_buf=path_or_buf, lines=True)
|
47 |
if n_samples is not None:
|
48 |
jsonObj = jsonObj.sample(n_samples, random_state=42)
|
|
|
71 |
|
72 |
# a method that samples n rows from a jsonl file, returning a pandas dataframe
|
73 |
@staticmethod
|
74 |
+
def _sample_jsonl(path_or_buf='data-cleaning-llm/data/cookies_train.jsonl', n_samples=5):
|
75 |
jsonObj = pd.read_json(path_or_buf=path_or_buf, lines=True)
|
76 |
return jsonObj.sample(n_samples, random_state=42)
|