mirror of
https://github.com/karma-riuk/crab-webapp.git
synced 2025-07-04 22:08:12 +02:00
removed useless module and using env vars because
better
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
# utils/paths.py
|
||||
from pathlib import Path
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
def get_project_path(relative_path: str) -> Path:
|
||||
return PROJECT_ROOT / relative_path
|
@ -1,16 +1,16 @@
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from typing_extensions import Callable
|
||||
from utils.build_handlers import get_build_handler
|
||||
from .paths import get_project_path
|
||||
from sacrebleu import sentence_bleu as bleu
|
||||
from utils.dataset import ArchiveState, Comment, CommentGenSubmission, Dataset
|
||||
|
||||
REFERENCE_MAP = Dataset.from_json(
|
||||
str(get_project_path('../data/dataset.json'))
|
||||
os.getenv("DATASET_PATH", os.path.join("data", "dataset.json")),
|
||||
).build_reference_map()
|
||||
|
||||
ARCHIVES_ROOT = str(get_project_path('../data/archives'))
|
||||
ARCHIVES_ROOT = os.getenv("ARCHIVES_ROOT", "data/archives")
|
||||
|
||||
|
||||
def comment_distance(submission: CommentGenSubmission, entry: Comment):
|
||||
|
Reference in New Issue
Block a user