Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RashmikaReddy authored Dec 15, 2023
1 parent 0bb0aaf commit 4c5e472
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/autora/doc/pipelines/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import itertools
import logging
import nltk

from timeit import default_timer as timer
from typing import List
from nltk.translate.bleu_score import corpus_bleu, SmoothingFunction
from nltk.translate.meteor_score import single_meteor_score

import nltk
import torch
import typer
from nltk.translate.bleu_score import corpus_bleu, SmoothingFunction
from nltk.translate.meteor_score import single_meteor_score

from autora.doc.runtime.predict_hf import Predictor
from autora.doc.runtime.prompts import INSTR, SYS, InstructionPrompts, SystemPrompts
Expand All @@ -20,7 +21,7 @@
logger = logging.getLogger(__name__)
nltk.download('wordnet')

def evaluate_documentation(predictions, references):
def evaluate_documentation(predictions, references) -> None:
# Tokenize predictions and references
tokenized_predictions = [pred[0].split() if pred else [] for pred in predictions]
tokenized_references = [[ref.split()] for ref in references]
Expand Down

0 comments on commit 4c5e472

Please sign in to comment.