Commit 1ca44ea6 authored by Mischa Buchhofer's avatar Mischa Buchhofer
Browse files

[refactor, #86] fix pylint errors

parent 10527430
Pipeline #77405 passed with stages
in 2 minutes and 44 seconds
import os
import json
from fastapi import FastAPI, Request
from fastapi.exceptions import RequestValidationError
from fastapi.responses import JSONResponse
from fastapi.encoders import jsonable_encoder
from pydantic import BaseModel # pylint: disable=no-name-in-module
from chatette.facade import Facade
from app.questiongenerator import QuestionGenerator
from app.summary.simple_spacy_summarizer import SimpleSpacySummarizer
from app.summary.summarization_with_strategy_tfidf import SummaryTFIDF
......@@ -15,9 +18,6 @@ from app.utilities.client_error_response import ClientErrorResponse
from app.utilities.server_error_response import ServerErrorResponse
from app.utilities import generator
from app.utilities.models import nlp, bert_model, bert_tokenizer
from chatette.facade import Facade
import os
import json
class Item(BaseModel):
......@@ -77,7 +77,7 @@ async def exception_handler(request: Request,
@app.post("/questionGenerator")
async def api_question_generator(item: Item):
question_generator = QuestionGenerator()
question_generator = QuestionGenerator(_nlp=nlp)
return question_generator.generate(
item.text,
num_questions=item.num_questions,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment