abdulmatinomotoso
commited on
Commit
•
e0215db
1
Parent(s):
6752a7b
Update app.py
Browse files
app.py
CHANGED
@@ -2,20 +2,14 @@
|
|
2 |
import re
|
3 |
import nltk
|
4 |
import torch
|
5 |
-
|
6 |
-
nltk.download("punkt")
|
7 |
import gradio as gr
|
|
|
|
|
8 |
from gradio.mix import Parallel
|
9 |
from transformers import pipeline
|
10 |
-
|
11 |
-
|
12 |
|
13 |
-
# Defining a function to read in the text file
|
14 |
-
def read_in_text(url):
|
15 |
-
with open(URL, "r") as file:
|
16 |
-
article = file.read()
|
17 |
-
|
18 |
-
return article
|
19 |
|
20 |
#initailizing the model pipeline
|
21 |
from transformers import BartTokenizer, BartForConditionalGeneration
|
|
|
2 |
import re
|
3 |
import nltk
|
4 |
import torch
|
5 |
+
import numpy as np
|
|
|
6 |
import gradio as gr
|
7 |
+
|
8 |
+
from nltk.tokenize import sent_tokenize
|
9 |
from gradio.mix import Parallel
|
10 |
from transformers import pipeline
|
11 |
+
nltk.download("punkt")
|
|
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
#initailizing the model pipeline
|
15 |
from transformers import BartTokenizer, BartForConditionalGeneration
|