Skip to content

Commit

Permalink
Update run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavani182 authored May 1, 2024
1 parent c7055b4 commit 2aef3a9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions authorship-verification-submission/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
if __name__ == "__main__":

# Load the data
tira = Client()
df = tira.pd.inputs(
tira_code = Client()
daf = tira_code.pd.inputs(
"nlpbuw-fsu-sose-24", f"authorship-verification-validation-20240408-training"
)

# Load the model and make predictions
model = load(Path(__file__).parent / "model.joblib")
predictions = model.predict(df["text"])
df["generated"] = predictions
df = df[["id", "generated"]]
predictions_model = model.predict(df["text"])
df["generated"] = predictions_model
daf = df[["id", "generated"]]

# Save the predictions
output_directory = get_output_directory(str(Path(__file__).parent))
df.to_json(
Path(output_directory) / "predictions.jsonl", orient="records", lines=True
)
output = get_output(str(Path(__file__).parent))
daf.to_json(
Path(output) / "predictions.jsonl", orient="records", lines=True
)

0 comments on commit 2aef3a9

Please sign in to comment.