Spaces:
Runtime error
Runtime error
Commit
·
ea70358
1
Parent(s):
afea983
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig
|
4 |
|
5 |
-
|
6 |
# Load the model and tokenizer from Hugging Face Spaces
|
7 |
model_name = "currentlyexhausted/flan-t5-summarizer" # update with your model name
|
8 |
config = AutoConfig.from_pretrained(model_name)
|
@@ -28,7 +27,6 @@ def generate_summary(passage):
|
|
28 |
|
29 |
# Convert the output token ids to text
|
30 |
output_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
31 |
-
|
32 |
return output_text
|
33 |
|
34 |
# Create the Gradio interface
|
|
|
2 |
import torch
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig
|
4 |
|
|
|
5 |
# Load the model and tokenizer from Hugging Face Spaces
|
6 |
model_name = "currentlyexhausted/flan-t5-summarizer" # update with your model name
|
7 |
config = AutoConfig.from_pretrained(model_name)
|
|
|
27 |
|
28 |
# Convert the output token ids to text
|
29 |
output_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
|
|
30 |
return output_text
|
31 |
|
32 |
# Create the Gradio interface
|