Spaces:
Runtime error
Runtime error
add flake8 and black
Browse filesFiles changed (5)
- .vscode/settings.json+2-4
- app.py+81-45
- main.py+48-20
- poetry.lock+153-1
- pyproject.toml+2
123456784 unmodified lines13141516{"python.linting.pylint" : false,"python.linting.flake8" : true,"python.linting.enabled" : true,"python.formatting.black" : true,"editor.formatOnSave": true,"python.linting.flake8Args":["--max-line-length=88"4 unmodified lines"python.testing.pytestArgs": ["tests"],}12344 unmodified lines91011121314{"editor.formatOnSave": true,"python.linting.flake8Args":["--max-line-length=88"4 unmodified lines"python.testing.pytestArgs": ["tests"],"black-formatter.importStrategy": "fromEnvironment","flake8.importStrategy": "fromEnvironment",}
1 unmodified line23456788 unmodified lines1718192021222321 unmodified lines4546474849502 unmodified lines53545556575859606162636465661 unmodified line68697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321 unmodified line1341351361371381391401411421431441451461471481491501511521534 unmodified lines1581591601611 unmodified lineimport gradio as grfrom pydantic import BaseModelfrom transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLMfrom loguru import logger# from pydantic import BaseModel8 unmodified linesEN_SENTIMENT_MODEL = "distilbert-base-uncased-finetuned-sst-2-english"DEFAULT_EN_TEXT ="""Flags on official buildings are being flown at half-mast and a minute's silence will be observed at midday.Fourteen people were shot dead at the Faculty of Arts building of Charles University in the capital by a student who then killed himself.Police are working to uncover the motive behind the attack.It is one of the deadliest assaults by a lone gunman in Europe this century.21 unmodified linesΠ΄ΠΎΠ½ΠΎΡΠΎΠ² Π΄Π»Ρ ΠΈΡ ΠΏΠΎΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ Π½Π° Π΄Π°Π½Π½ΡΠΉ ΡΠ°Ρ ΡΠΎΠΆΠ΅ ΡΠΆΠ΅ Π½Π΅ΠΌΠ°Π»ΠΎΒ», β Π½Π°ΠΏΠΈΡΠ°Π»ΠΎ Π²Π΅Π΄ΠΎΠΌΡΡΠ²ΠΎ."""class Request(BaseModel):text: str2 unmodified linessentiment_score: floatsentiment_label: strsummary: strdef to_str(self):return f"Summary: {self.summary}\n Sentiment: {self.sentiment_label} ({self.sentiment_score:.3f})"# class Response(BaseModel):# results: List[Result] # list of Result objectsclass Summarizer():ru_summary_pipe: pipelineru_sentiment_pipe: pipelineen_summary_pipe: pipeline1 unmodified line# sum_model_name = "csebuetnlp/mT5_multilingual_XLSum"# sum_tokenizer = AutoTokenizer.from_pretrained(sum_model_name)# sum_model = AutoModelForSeq2SeqLM.from_pretrained(sum_model_name)def __init__(self) -> None:sum_pipe = pipeline("summarization", model=RU_SUMMARY_MODEL, max_length=100, truncation=True)self.ru_summary_pipe = sum_pipeself.ru_sentiment_pipe = pipeline("sentiment-analysis", model=RU_SENTIMENT_MODEL)self.en_summary_pipe = sum_pipeself.en_sentiment_pipe = pipeline("sentiment-analysis", model=EN_SENTIMENT_MODEL)def mT5_summarize(self, text: str) -> str:'''Handle text with mT5 model without pipeline'''WHITESPACE_HANDLER = lambda k: re.sub('\s+', ' ', re.sub('\n+', ' ', k.strip()))input_ids = self.sum_tokenizer([WHITESPACE_HANDLER(text)],return_tensors="pt",padding="max_length",truncation=True,max_length=512)["input_ids"]output_ids = self.sum_model.generate(input_ids=input_ids,max_length=84,no_repeat_ngram_size=2,num_beams=4)[0]summary = self.sum_tokenizer.decode(output_ids,skip_special_tokens=True,clean_up_tokenization_spaces=False)return summarydef get_pipe(self, lang: str):logger.info(f'Pipe language: {lang}')summary = {'en': self.en_summary_pipe,'ru': self.ru_summary_pipe,}sentiment = {'en': self.en_sentiment_pipe,'ru': self.ru_sentiment_pipe,}return summary[lang], sentiment[lang]def summarize(self, text: Request, lang: str = 'en') -> Result:sum_pipe, sent_pipe = self.get_pipe(lang)response_summary = sum_pipe(text)logger.info(response_summary)response_sentiment = sent_pipe(text)logger.info(response_sentiment)result = Result(summary=response_summary[0]["summary_text"],sentiment_label=response_sentiment[0]["label"],sentiment_score=response_sentiment[0]["score"],)return resultdef summ(self, text: Request, lang: str = 'en') -> str:return self.summarize(text, lang).to_str()if __name__ == "__main__":pipe = Summarizer()1 unmodified linewith gr.Blocks() as demo:with gr.Row():with gr.Column(scale=2, min_width=600):en_sum_description=gr.Markdown(value=f"Model for Summary: {EN_SUMMARY_MODEL}")en_sent_description=gr.Markdown(value=f"Model for Sentiment: {EN_SENTIMENT_MODEL}")en_inputs=gr.Textbox(label="en_input", lines=5, value=DEFAULT_EN_TEXT, placeholder=DEFAULT_EN_TEXT)en_lang=gr.Textbox(value='en',visible=False)en_outputs=gr.Textbox(label="en_output", lines=5, placeholder="Summary and Sentiment would be here...")en_inbtn = gr.Button("Proceed")with gr.Column(scale=2, min_width=600):ru_sum_description=gr.Markdown(value=f"Model for Summary: {RU_SUMMARY_MODEL}")ru_sent_description=gr.Markdown(value=f"Model for Sentiment: {RU_SENTIMENT_MODEL}")ru_inputs=gr.Textbox(label="ru_input", lines=5, value=DEFAULT_RU_TEXT, placeholder=DEFAULT_RU_TEXT)ru_lang=gr.Textbox(value='ru',visible=False)ru_outputs=gr.Textbox(label="ru_output", lines=5, placeholder="ΠΠ΄Π΅ΡΡ Π±ΡΠ΄Π΅Ρ ΠΎΠ±ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΈ ΡΠΌΠΎΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΠΉ ΠΎΠΊΡΠ°Ρ ΡΠ΅ΠΊΡΡΠ°...")ru_inbtn = gr.Button("ΠΠ°ΠΏΡΡΡΠΈΡΡ")en_inbtn.click(pipe.summ,[en_inputs, en_lang],4 unmodified lines[ru_inputs, ru_lang],[ru_outputs],)demo.launch(show_api=False)1 unmodified line23456788 unmodified lines1718192021222321 unmodified lines454647484950512 unmodified lines545556575859606162636465666768691 unmodified line71727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421 unmodified line1441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881894 unmodified lines1941951961971 unmodified lineimport gradio as grfrom pydantic import BaseModelfrom transformers import pipelinefrom loguru import logger# from pydantic import BaseModel8 unmodified linesEN_SENTIMENT_MODEL = "distilbert-base-uncased-finetuned-sst-2-english"DEFAULT_EN_TEXT = """Flags on official buildings are being flown at half-mast and a minute's silence will be observed at midday.Fourteen people were shot dead at the Faculty of Arts building of Charles University in the capital by a student who then killed himself.Police are working to uncover the motive behind the attack.It is one of the deadliest assaults by a lone gunman in Europe this century.21 unmodified linesΠ΄ΠΎΠ½ΠΎΡΠΎΠ² Π΄Π»Ρ ΠΈΡ ΠΏΠΎΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ Π½Π° Π΄Π°Π½Π½ΡΠΉ ΡΠ°Ρ ΡΠΎΠΆΠ΅ ΡΠΆΠ΅ Π½Π΅ΠΌΠ°Π»ΠΎΒ», β Π½Π°ΠΏΠΈΡΠ°Π»ΠΎ Π²Π΅Π΄ΠΎΠΌΡΡΠ²ΠΎ."""class Request(BaseModel):text: str2 unmodified linessentiment_score: floatsentiment_label: strsummary: strdef to_str(self):return f"Summary: {self.summary}\nSentiment: {self.sentiment_label} ({self.sentiment_score:.3f})"# class Response(BaseModel):# results: List[Result] # list of Result objectsclass Summarizer:ru_summary_pipe: pipelineru_sentiment_pipe: pipelineen_summary_pipe: pipeline1 unmodified line# sum_model_name = "csebuetnlp/mT5_multilingual_XLSum"# sum_tokenizer = AutoTokenizer.from_pretrained(sum_model_name)# sum_model = AutoModelForSeq2SeqLM.from_pretrained(sum_model_name)def __init__(self) -> None:sum_pipe = pipeline("summarization", model=RU_SUMMARY_MODEL, max_length=100, truncation=True)self.ru_summary_pipe = sum_pipeself.ru_sentiment_pipe = pipeline("sentiment-analysis", model=RU_SENTIMENT_MODEL)self.en_summary_pipe = sum_pipeself.en_sentiment_pipe = pipeline("sentiment-analysis", model=EN_SENTIMENT_MODEL)def mT5_summarize(self, text: str) -> str:"""Handle text with mT5 model without pipeline"""def whitespace_handler(text: str):return re.sub("\s+", " ", re.sub("\n+", " ", text.strip()))input_ids = self.sum_tokenizer([whitespace_handler(text)],return_tensors="pt",padding="max_length",truncation=True,max_length=512,)["input_ids"]output_ids = self.sum_model.generate(input_ids=input_ids, max_length=84, no_repeat_ngram_size=2, num_beams=4)[0]summary = self.sum_tokenizer.decode(output_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)return summarydef get_pipe(self, lang: str):logger.info(f"Pipe language: {lang}")summary = {"en": self.en_summary_pipe,"ru": self.ru_summary_pipe,}sentiment = {"en": self.en_sentiment_pipe,"ru": self.ru_sentiment_pipe,}return summary[lang], sentiment[lang]def summarize(self, req: Request, lang: str = "en") -> Result:sum_pipe, sent_pipe = self.get_pipe(lang)response_summary = sum_pipe(req.text)logger.info(response_summary)response_sentiment = sent_pipe(req.text)logger.info(response_sentiment)result = Result(summary=response_summary[0]["summary_text"],sentiment_label=response_sentiment[0]["label"],sentiment_score=response_sentiment[0]["score"],)return resultdef summ(self, req: Request, lang: str = "en") -> str:return self.summarize(req, lang).to_str()if __name__ == "__main__":pipe = Summarizer()1 unmodified linewith gr.Blocks() as demo:with gr.Row():with gr.Column(scale=2, min_width=600):en_sum_description = gr.Markdown(value=f"Model for Summary: {EN_SUMMARY_MODEL}")en_sent_description = gr.Markdown(value=f"Model for Sentiment: {EN_SENTIMENT_MODEL}")en_inputs = gr.Textbox(label="en_input",lines=5,value=DEFAULT_EN_TEXT,placeholder=DEFAULT_EN_TEXT,)en_lang = gr.Textbox(value="en", visible=False)en_outputs = gr.Textbox(label="en_output",lines=5,placeholder="Summary and Sentiment would be here...",)en_inbtn = gr.Button("Proceed")with gr.Column(scale=2, min_width=600):ru_sum_description = gr.Markdown(value=f"Model for Summary: {RU_SUMMARY_MODEL}")ru_sent_description = gr.Markdown(value=f"Model for Sentiment: {RU_SENTIMENT_MODEL}")ru_inputs = gr.Textbox(label="ru_input",lines=5,value=DEFAULT_RU_TEXT,placeholder=DEFAULT_RU_TEXT,)ru_lang = gr.Textbox(value="ru", visible=False)ru_outputs = gr.Textbox(label="ru_output",lines=5,placeholder="ΠΠ΄Π΅ΡΡ Π±ΡΠ΄Π΅Ρ ΠΎΠ±ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΈ ΡΠΌΠΎΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΠΉ ΠΎΠΊΡΠ°Ρ ΡΠ΅ΠΊΡΡΠ°...",)ru_inbtn = gr.Button("ΠΠ°ΠΏΡΡΡΠΈΡΡ")en_inbtn.click(pipe.summ,[en_inputs, en_lang],4 unmodified lines[ru_inputs, ru_lang],[ru_outputs],)demo.launch(show_api=False)
123456789101112131415161718192021222324252627282930313233343536373839404142435 unmodified lines49505152535455import gradio as grfrom fastapi import FastAPIfrom typing import Listfrom app import Summarizer, Request, Resultfrom app import EN_SENTIMENT_MODEL, EN_SUMMARY_MODEL, RU_SENTIMENT_MODEL, RU_SUMMARY_MODELfrom app import DEFAULT_EN_TEXT, DEFAULT_RU_TEXTapp = FastAPI()pipe = Summarizer()@app.post("/summ_ru", response_model=Result)async def ru_summ_api(request: Request):results = pipe.summarize(request.text, lang='ru')return results@app.post("/summ_en", response_model=Result)async def ru_summ_api(request: Request):results = pipe.summarize(request.text, lang='en')return resultswith gr.Blocks() as demo:with gr.Row():with gr.Column(scale=2, min_width=600):en_sum_description=gr.Markdown(value=f"Model for Summary: {EN_SUMMARY_MODEL}")en_sent_description=gr.Markdown(value=f"Model for Sentiment: {EN_SENTIMENT_MODEL}")en_inputs=gr.Textbox(label="en_input", lines=5, value=DEFAULT_EN_TEXT, placeholder=DEFAULT_EN_TEXT)en_lang=gr.Textbox(value='en',visible=False)en_outputs=gr.Textbox(label="en_output", lines=5, placeholder="Summary and Sentiment would be here...")en_inbtn = gr.Button("Proceed")with gr.Column(scale=2, min_width=600):ru_sum_description=gr.Markdown(value=f"Model for Summary: {RU_SUMMARY_MODEL}")ru_sent_description=gr.Markdown(value=f"Model for Sentiment: {RU_SENTIMENT_MODEL}")ru_inputs=gr.Textbox(label="ru_input", lines=5, value=DEFAULT_RU_TEXT, placeholder=DEFAULT_RU_TEXT)ru_lang=gr.Textbox(value='ru',visible=False)ru_outputs=gr.Textbox(label="ru_output", lines=5, placeholder="ΠΠ΄Π΅ΡΡ Π±ΡΠ΄Π΅Ρ ΠΎΠ±ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΈ ΡΠΌΠΎΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΠΉ ΠΎΠΊΡΠ°Ρ ΡΠ΅ΠΊΡΡΠ°...")ru_inbtn = gr.Button("ΠΠ°ΠΏΡΡΡΠΈΡΡ")en_inbtn.click(pipe.summ,[en_inputs, en_lang],5 unmodified lines[ru_outputs],)# demo.launch(show_api=False)# mounting at the root pathapp = gr.mount_gradio_app(app, demo, path="/")123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172735 unmodified lines7980818283import gradio as grfrom fastapi import FastAPIfrom app import Summarizer, Request, Resultfrom app import (EN_SENTIMENT_MODEL,EN_SUMMARY_MODEL,RU_SENTIMENT_MODEL,RU_SUMMARY_MODEL,)from app import DEFAULT_EN_TEXT, DEFAULT_RU_TEXTapp = FastAPI()pipe = Summarizer()@app.post("/summ_ru", response_model=Result)async def ru_summ_api(request: Request):results = pipe.summarize(request.text, lang="ru")return results@app.post("/summ_en", response_model=Result)async def en_summ_api(request: Request):results = pipe.summarize(request.text, lang="en")return resultswith gr.Blocks() as demo:with gr.Row():with gr.Column(scale=2, min_width=600):en_sum_description = gr.Markdown(value=f"Model for Summary: {EN_SUMMARY_MODEL}")en_sent_description = gr.Markdown(value=f"Model for Sentiment: {EN_SENTIMENT_MODEL}")en_inputs = gr.Textbox(label="en_input",lines=5,value=DEFAULT_EN_TEXT,placeholder=DEFAULT_EN_TEXT,)en_lang = gr.Textbox(value="en", visible=False)en_outputs = gr.Textbox(label="en_output",lines=5,placeholder="Summary and Sentiment would be here...",)en_inbtn = gr.Button("Proceed")with gr.Column(scale=2, min_width=600):ru_sum_description = gr.Markdown(value=f"Model for Summary: {RU_SUMMARY_MODEL}")ru_sent_description = gr.Markdown(value=f"Model for Sentiment: {RU_SENTIMENT_MODEL}")ru_inputs = gr.Textbox(label="ru_input",lines=5,value=DEFAULT_RU_TEXT,placeholder=DEFAULT_RU_TEXT,)ru_lang = gr.Textbox(value="ru", visible=False)ru_outputs = gr.Textbox(label="ru_output",lines=5,placeholder="ΠΠ΄Π΅ΡΡ Π±ΡΠ΄Π΅Ρ ΠΎΠ±ΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΈ ΡΠΌΠΎΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΠΉ ΠΎΠΊΡΠ°Ρ ΡΠ΅ΠΊΡΡΠ°...",)ru_inbtn = gr.Button("ΠΠ°ΠΏΡΡΡΠΈΡΡ")en_inbtn.click(pipe.summ,[en_inputs, en_lang],5 unmodified lines[ru_outputs],)# mounting at the root pathapp = gr.mount_gradio_app(app, demo, path="/")
90 unmodified lines919293949596276 unmodified lines373374375376377378600 unmodified lines97998098198298398422 unmodified lines100710081009101010111012246 unmodified lines12591260126112621263126462 unmodified lines13271328132913301331133232 unmodified lines136513661367136813691370144 unmodified lines151515161517151815191520769 unmodified lines229022912292229322942295387 unmodified lines268326842685268690 unmodified linestests = ["attrs[tests-no-zope]", "zope-interface"]tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"][[package]]name = "certifi"version = "2023.11.17"276 unmodified linestesting = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"]typing = ["typing-extensions (>=4.8)"][[package]]name = "fonttools"version = "4.47.0"600 unmodified linespyparsing = ">=2.3.1"python-dateutil = ">=2.7"[[package]]name = "mdurl"version = "0.1.2"22 unmodified linestesting = ["astroid (>=2.0)", "coverage", "pylint (>=2.3.1,<2.4.0)", "pytest"]yaml = ["PyYAML (>=5.1.0)"][[package]]name = "numpy"version = "1.26.2"246 unmodified linestest = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"]xml = ["lxml (>=4.8.0)"][[package]]name = "pillow"version = "10.1.0"62 unmodified linesdocs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"]tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"][[package]]name = "pretrainedmodels"version = "0.7.4"32 unmodified lines{file = "protobuf-4.25.1.tar.gz", hash = "sha256:57d65074b4f5baa4ab5da1605c02be90ac20c8b40fb137d6a8df9f416b0d0ce2"},][[package]]name = "pydantic"version = "2.5.3"144 unmodified lines{file = "pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f"},][[package]]name = "pygments"version = "2.17.2"769 unmodified linesdocs = ["setuptools_rust", "sphinx", "sphinx_rtd_theme"]testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"][[package]]name = "tomlkit"version = "0.12.0"387 unmodified lines[metadata]lock-version = "2.0"python-versions = "^3.10"content-hash = "a0a8f5d7bbfd3d08c83e048ee2f8e18cf31729338afa2484b5f817c387457622"90 unmodified lines919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143276 unmodified lines420421422423424425426427428429430431432433434435436437438439440441442600 unmodified lines10431044104510461047104810491050105110521053105410551056105710581059106022 unmodified lines108310841085108610871088108910901091109210931094109510961097109810991100246 unmodified lines13471348134913501351135213531354135513561357135813591360136113621363136462 unmodified lines142714281429143014311432143314341435143614371438143914401441144214431444144514461447144832 unmodified lines148114821483148414851486148714881489149014911492149314941495149614971498144 unmodified lines164316441645164616471648164916501651165216531654165516561657165816591660769 unmodified lines243024312432243324342435243624372438243924402441244224432444244524462447387 unmodified lines283528362837283890 unmodified linestests = ["attrs[tests-no-zope]", "zope-interface"]tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"][[package]]name = "black"version = "24.1.1"description = "The uncompromising code formatter."category = "dev"optional = falsepython-versions = ">=3.8"files = [{file = "black-24.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2588021038bd5ada078de606f2a804cadd0a3cc6a79cb3e9bb3a8bf581325a4c"},{file = "black-24.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a95915c98d6e32ca43809d46d932e2abc5f1f7d582ffbe65a5b4d1588af7445"},{file = "black-24.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fa6a0e965779c8f2afb286f9ef798df770ba2b6cee063c650b96adec22c056a"},{file = "black-24.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:5242ecd9e990aeb995b6d03dc3b2d112d4a78f2083e5a8e86d566340ae80fec4"},{file = "black-24.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fc1ec9aa6f4d98d022101e015261c056ddebe3da6a8ccfc2c792cbe0349d48b7"},{file = "black-24.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0269dfdea12442022e88043d2910429bed717b2d04523867a85dacce535916b8"},{file = "black-24.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3d64db762eae4a5ce04b6e3dd745dcca0fb9560eb931a5be97472e38652a161"},{file = "black-24.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:5d7b06ea8816cbd4becfe5f70accae953c53c0e53aa98730ceccb0395520ee5d"},{file = "black-24.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e2c8dfa14677f90d976f68e0c923947ae68fa3961d61ee30976c388adc0b02c8"},{file = "black-24.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a21725862d0e855ae05da1dd25e3825ed712eaaccef6b03017fe0853a01aa45e"},{file = "black-24.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07204d078e25327aad9ed2c64790d681238686bce254c910de640c7cc4fc3aa6"},{file = "black-24.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:a83fe522d9698d8f9a101b860b1ee154c1d25f8a82ceb807d319f085b2627c5b"},{file = "black-24.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:08b34e85170d368c37ca7bf81cf67ac863c9d1963b2c1780c39102187ec8dd62"},{file = "black-24.1.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7258c27115c1e3b5de9ac6c4f9957e3ee2c02c0b39222a24dc7aa03ba0e986f5"},{file = "black-24.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40657e1b78212d582a0edecafef133cf1dd02e6677f539b669db4746150d38f6"},{file = "black-24.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e298d588744efda02379521a19639ebcd314fba7a49be22136204d7ed1782717"},{file = "black-24.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:34afe9da5056aa123b8bfda1664bfe6fb4e9c6f311d8e4a6eb089da9a9173bf9"},{file = "black-24.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:854c06fb86fd854140f37fb24dbf10621f5dab9e3b0c29a690ba595e3d543024"},{file = "black-24.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3897ae5a21ca132efa219c029cce5e6bfc9c3d34ed7e892113d199c0b1b444a2"},{file = "black-24.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:ecba2a15dfb2d97105be74bbfe5128bc5e9fa8477d8c46766505c1dda5883aac"},{file = "black-24.1.1-py3-none-any.whl", hash = "sha256:5cdc2e2195212208fbcae579b931407c1fa9997584f0a415421748aeafff1168"},{file = "black-24.1.1.tar.gz", hash = "sha256:48b5760dcbfe5cf97fd4fba23946681f3a81514c6ab8a45b50da67ac8fbc6c7b"},][package.dependencies]click = ">=8.0.0"mypy-extensions = ">=0.4.3"packaging = ">=22.0"pathspec = ">=0.9.0"platformdirs = ">=2"tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""}[package.extras]colorama = ["colorama (>=0.4.3)"]d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"]jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]uvloop = ["uvloop (>=0.15.2)"][[package]]name = "certifi"version = "2023.11.17"276 unmodified linestesting = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"]typing = ["typing-extensions (>=4.8)"][[package]]name = "flake8"version = "7.0.0"description = "the modular source code checker: pep8 pyflakes and co"category = "dev"optional = falsepython-versions = ">=3.8.1"files = [{file = "flake8-7.0.0-py2.py3-none-any.whl", hash = "sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3"},{file = "flake8-7.0.0.tar.gz", hash = "sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132"},][package.dependencies]mccabe = ">=0.7.0,<0.8.0"pycodestyle = ">=2.11.0,<2.12.0"pyflakes = ">=3.2.0,<3.3.0"[[package]]name = "fonttools"version = "4.47.0"600 unmodified linespyparsing = ">=2.3.1"python-dateutil = ">=2.7"[[package]]name = "mccabe"version = "0.7.0"description = "McCabe checker, plugin for flake8"category = "dev"optional = falsepython-versions = ">=3.6"files = [{file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},{file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},][[package]]name = "mdurl"version = "0.1.2"22 unmodified linestesting = ["astroid (>=2.0)", "coverage", "pylint (>=2.3.1,<2.4.0)", "pytest"]yaml = ["PyYAML (>=5.1.0)"][[package]]name = "mypy-extensions"version = "1.0.0"description = "Type system extensions for programs checked with the mypy type checker."category = "dev"optional = falsepython-versions = ">=3.5"files = [{file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},{file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},][[package]]name = "numpy"version = "1.26.2"246 unmodified linestest = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"]xml = ["lxml (>=4.8.0)"][[package]]name = "pathspec"version = "0.12.1"description = "Utility library for gitignore style pattern matching of file paths."category = "dev"optional = falsepython-versions = ">=3.8"files = [{file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},{file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},][[package]]name = "pillow"version = "10.1.0"62 unmodified linesdocs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"]tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"][[package]]name = "platformdirs"version = "4.1.0"description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."category = "dev"optional = falsepython-versions = ">=3.8"files = [{file = "platformdirs-4.1.0-py3-none-any.whl", hash = "sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380"},{file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"},][package.extras]docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"]test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"][[package]]name = "pretrainedmodels"version = "0.7.4"32 unmodified lines{file = "protobuf-4.25.1.tar.gz", hash = "sha256:57d65074b4f5baa4ab5da1605c02be90ac20c8b40fb137d6a8df9f416b0d0ce2"},][[package]]name = "pycodestyle"version = "2.11.1"description = "Python style guide checker"category = "dev"optional = falsepython-versions = ">=3.8"files = [{file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"},{file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"},][[package]]name = "pydantic"version = "2.5.3"144 unmodified lines{file = "pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f"},][[package]]name = "pyflakes"version = "3.2.0"description = "passive checker of Python programs"category = "dev"optional = falsepython-versions = ">=3.8"files = [{file = "pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a"},{file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"},][[package]]name = "pygments"version = "2.17.2"769 unmodified linesdocs = ["setuptools_rust", "sphinx", "sphinx_rtd_theme"]testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"][[package]]name = "tomli"version = "2.0.1"description = "A lil' TOML parser"category = "dev"optional = falsepython-versions = ">=3.7"files = [{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},][[package]]name = "tomlkit"version = "0.12.0"387 unmodified lines[metadata]lock-version = "2.0"python-versions = "^3.10"content-hash = "5648f003dcb355b02c351874f25f204380d23b153110cec7f6177e81fd260dbf"
21 unmodified lines22232425262721 unmodified lines[tool.poetry.group.dev.dependencies]huggingface-hub = "^0.20.1"[build-system]requires = ["poetry-core"]21 unmodified lines222324252627282921 unmodified lines[tool.poetry.group.dev.dependencies]huggingface-hub = "^0.20.1"flake8 = "^7.0.0"black = "^24.1.1"[build-system]requires = ["poetry-core"]
.vscode/settings.json+2-4
app.py+81-45
main.py+48-20
poetry.lock+153-1
pyproject.toml+2