Commit
·
36c9e84
1
Parent(s):
205984a
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM,
|
| 3 |
|
| 4 |
-
pipe =
|
| 5 |
|
| 6 |
gr.Interface.from_pipeline(pipe,
|
| 7 |
inputs = "text",
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, Text2TextGenerationPipeline
|
| 3 |
|
| 4 |
+
pipe = Text2TextGenerationPipeline(model = AutoModelForSeq2SeqLM.from_pretrained("jpelhaw/t5-word-sense-disambiguation"),tokenizer = AutoTokenizer.from_pretrained("jpelhaw/t5-word-sense-disambiguation"), )
|
| 5 |
|
| 6 |
gr.Interface.from_pipeline(pipe,
|
| 7 |
inputs = "text",
|