RichieBurundi commited on
Commit
b44d572
1 Parent(s): b88328d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,11 +1,9 @@
1
  import torch
2
- from transformers import AutoTokenizer, AutoModelForCausalLM
3
- import streamlit as st
4
 
5
- # Загрузка модели и токенизатора
6
  model_name = "Richieburundi/Ariginalmodel"
7
- tokenizer = AutoTokenizer.from_pretrained(model_name)
8
- model = AutoModelForCausalLM.from_pretrained(model_name)
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")