Spaces:
Sleeping
Sleeping
RichieBurundi
commited on
Commit
•
b44d572
1
Parent(s):
b88328d
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from transformers import
|
3 |
-
import streamlit as st
|
4 |
|
5 |
-
# Загрузка модели и токенизатора
|
6 |
model_name = "Richieburundi/Ariginalmodel"
|
7 |
-
|
8 |
-
|
9 |
|
10 |
def generate_text(input_text, max_length=50):
|
11 |
inputs = tokenizer(input_text, return_tensors="pt")
|
|
|
1 |
import torch
|
2 |
+
from transformers import AutoModel
|
|
|
3 |
|
|
|
4 |
model_name = "Richieburundi/Ariginalmodel"
|
5 |
+
model = AutoModel.from_pretrained(model_name, config=None, tokenizer=None)
|
6 |
+
import streamlit as st
|
7 |
|
8 |
def generate_text(input_text, max_length=50):
|
9 |
inputs = tokenizer(input_text, return_tensors="pt")
|