import gradio import torch from transformers import pipeline def summarize(doc): summarizer_pipeline = pipeline("summarization", model="UNIST-Eunchan/Paper-Summarization-ArXiv") doc = r"{doc}".replace('\n', ' ') result = summarizer_pipeline(doc) return s.replace("", " ") # s = 'Given two images of different anime roles, anime style recognition (ASR) aims to learn abstract painting style to determine whether the two images are from the same work, which is an interesting but challenging problem. Unlike biometric recognition, such as face recognition, iris recognition, and person re-identification, ASR suffers from a much larger semantic gap but receives less attention. In this paper, we propose a challenging ASR benchmark. Firstly, we collect a large-scale ASR dataset (LSASRD), which contains 20,937 images of 190 anime works and each work at least has ten different roles. In addition to the large-scale, LSASRD contains a list of challenging factors, such as complex illuminations, various poses, theatrical colors and exaggerated compositions. Secondly, we design a cross-role protocol to evaluate ASR performance, in which query and gallery images must come from different roles to validate an ASR model is to learn abstract painting style rather than learn discriminative features of roles. Finally, we apply two powerful person re-identification methods, namely, AGW and TransReID, to construct the baseline performance on LSASRD. Surprisingly, the recent transformer model (i.e., TransReID) only acquires a 42.24% mAP on LSASRD. Therefore, we believe that the ASR task of a huge semantic gap deserves deep and long-term research.' # print(' '.join(summarize(s).split())) app = gradio.Interface( fn = summarize, inputs = gradio.Textbox(placeholder = 'Paste The Abstract Here', label = 'Abstract'), outputs = gradio.Textbox(label = 'Summary'), title = 'Paper Abstract Summarizer', description = 'A text summarizer to summarize paper abstract' ) def main(): app.launch(share=True) if __name__ == '__main__': main()