JustKiddo commited on
Commit
09bbd11
1 Parent(s): 7fcc69d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
  import time
5
 
@@ -68,7 +68,7 @@ def load_model():
68
  # Using VietAI's Vietnamese GPT model
69
  model_name = "google-t5/t5-base"
70
  tokenizer = AutoTokenizer.from_pretrained(model_name)
71
- model = AutoModelForCausalLM.from_pretrained(model_name)
72
  return model, tokenizer
73
 
74
  def generate_response(prompt, model, tokenizer, max_length=4169):
 
1
  import streamlit as st
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoModelForSeq2SeqLM
3
  import torch
4
  import time
5
 
 
68
  # Using VietAI's Vietnamese GPT model
69
  model_name = "google-t5/t5-base"
70
  tokenizer = AutoTokenizer.from_pretrained(model_name)
71
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
72
  return model, tokenizer
73
 
74
  def generate_response(prompt, model, tokenizer, max_length=4169):