Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def get_model_t5(model_name,tokenizer_name):
|
|
17 |
|
18 |
|
19 |
def predict_gpt(text, model, tokenizer, temperature=1.0):
|
20 |
-
text = text.replace('\n','')+'Описание:'
|
21 |
input_ids = tokenizer.encode(text, return_tensors="pt")
|
22 |
|
23 |
model.eval()
|
@@ -68,7 +68,7 @@ def generate(model,temp,text):
|
|
68 |
return result
|
69 |
|
70 |
|
71 |
-
gpt_model, gpt_tokenizer = get_model_gpt('
|
72 |
t5_model, t5_tokenizer = get_model_t5('mipatov/rut5_nb_descr', 'mipatov/rut5_nb_descr')
|
73 |
|
74 |
|
|
|
17 |
|
18 |
|
19 |
def predict_gpt(text, model, tokenizer, temperature=1.0):
|
20 |
+
text = text.replace('\n','')+' Описание:'
|
21 |
input_ids = tokenizer.encode(text, return_tensors="pt")
|
22 |
|
23 |
model.eval()
|
|
|
68 |
return result
|
69 |
|
70 |
|
71 |
+
gpt_model, gpt_tokenizer = get_model_gpt('gpt/', 'gpt/')
|
72 |
t5_model, t5_tokenizer = get_model_t5('mipatov/rut5_nb_descr', 'mipatov/rut5_nb_descr')
|
73 |
|
74 |
|