Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,25 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
tokenizer = AutoTokenizer.from_pretrained("milyiyo/paraphraser-german-mt5-small")
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("milyiyo/paraphraser-german-mt5-small")
|
7 |
|
|
|
2 |
import gradio as gr
|
3 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
4 |
|
5 |
+
# versions = {
|
6 |
+
# 'v1': {
|
7 |
+
# 'name': "milyiyo/paraphraser-german-mt5-small",
|
8 |
+
# 'tokenizer': None,
|
9 |
+
# 'model': None
|
10 |
+
# },
|
11 |
+
# 'v2': {
|
12 |
+
# 'name':"milyiyo/paraphraser-german-mt5-smal-v2",
|
13 |
+
# 'tokenizer': None,
|
14 |
+
# 'model': None
|
15 |
+
# },
|
16 |
+
# }
|
17 |
+
|
18 |
+
# versions['v1']['tokenizer'] = AutoTokenizer.from_pretrained(versions['v1']['name'])
|
19 |
+
# versions['v1']['model'] = AutoModelForSeq2SeqLM.from_pretrained(versions['v1']['name'])
|
20 |
+
|
21 |
+
# versions['v2']['tokenizer'] = AutoTokenizer.from_pretrained(versions['v2']['name'])
|
22 |
+
# versions['v2']['model'] = AutoModelForSeq2SeqLM.from_pretrained(versions['v2']['name'])
|
23 |
+
|
24 |
tokenizer = AutoTokenizer.from_pretrained("milyiyo/paraphraser-german-mt5-small")
|
25 |
model = AutoModelForSeq2SeqLM.from_pretrained("milyiyo/paraphraser-german-mt5-small")
|
26 |
|