JustKiddo commited on
Commit
c99097e
1 Parent(s): 138c789

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  import os
3
- from transformers import AutoModelForCausalLM, AutoTokenizer
4
  from huggingface_hub import login
5
  import torch
6
 
@@ -9,8 +9,8 @@ class VietnameseChatbot:
9
  """
10
  Initialize the Vietnamese chatbot with a pre-trained model
11
  """
12
- self.tokenizer = AutoTokenizer.from_pretrained(model_name)
13
- self.model = AutoModelForCausalLM.from_pretrained(model_name)
14
 
15
  # Use GPU if available
16
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
 
1
  import streamlit as st
2
  import os
3
+ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoModel
4
  from huggingface_hub import login
5
  import torch
6
 
 
9
  """
10
  Initialize the Vietnamese chatbot with a pre-trained model
11
  """
12
+ #self.tokenizer = AutoTokenizer.from_pretrained(model_name)
13
+ self.model = AutoModel.from_pretrained("TheBloke/Llama-2-7B-Chat-GGML")
14
 
15
  # Use GPU if available
16
  self.device = "cuda" if torch.cuda.is_available() else "cpu"