Spaces:
Sleeping
Sleeping
hakim
commited on
Commit
•
5afaf1e
1
Parent(s):
b33a881
app updated
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ class PredictionPipeline:
|
|
10 |
self.config = ConfigurationManager().get_model_evaluation_config()
|
11 |
|
12 |
def predict(self,text):
|
13 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
14 |
gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 128}
|
15 |
|
16 |
-
pipe = pipeline("summarization", model=
|
17 |
|
18 |
print("Dialogue:")
|
19 |
print(text)
|
|
|
10 |
self.config = ConfigurationManager().get_model_evaluation_config()
|
11 |
|
12 |
def predict(self,text):
|
13 |
+
tokenizer = AutoTokenizer.from_pretrained('tokenizer')
|
14 |
gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 128}
|
15 |
|
16 |
+
pipe = pipeline("summarization", model='pegasus-samsum-model',tokenizer=tokenizer)
|
17 |
|
18 |
print("Dialogue:")
|
19 |
print(text)
|