Spaces:
Sleeping
Sleeping
Ahmed
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ model = AutoModelForSeq2SeqLM.from_pretrained(instruct_model_name)
|
|
8 |
|
9 |
def SummarizeThis(Dialogue):
|
10 |
prompt = f"""
|
11 |
-
Summarize the following conversation
|
12 |
|
13 |
{Dialogue}
|
14 |
|
@@ -19,7 +19,7 @@ def SummarizeThis(Dialogue):
|
|
19 |
Summary = tokenizer.decode(
|
20 |
model.generate(
|
21 |
inputs["input_ids"],
|
22 |
-
max_new_tokens=
|
23 |
)[0],
|
24 |
skip_special_tokens=True
|
25 |
)
|
|
|
8 |
|
9 |
def SummarizeThis(Dialogue):
|
10 |
prompt = f"""
|
11 |
+
Summarize the following conversation.
|
12 |
|
13 |
{Dialogue}
|
14 |
|
|
|
19 |
Summary = tokenizer.decode(
|
20 |
model.generate(
|
21 |
inputs["input_ids"],
|
22 |
+
max_new_tokens=500,
|
23 |
)[0],
|
24 |
skip_special_tokens=True
|
25 |
)
|