Spaces:
Running
Running
from fastai.text.all import * | |
from blurr.text.modeling.all import * | |
import gradio as gr | |
# Load the exported model | |
learn = load_learner('article_highlights.pkl') | |
def generate_summary(article_text): | |
# Perform inference using the loaded model | |
summary = learn.blurr_generate_summary(article_text) | |
return summary | |
def main(): | |
article_text = input() | |
summary = generate_summary(article_text) | |
print(summary) | |
if __name__ == "__main__": | |
main() | |