Cran-May commited on
Commit
697dc89
·
1 Parent(s): 63cc1e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,6 +1,7 @@
1
  from gradio_client import Client
2
  from time import sleep
3
- from ctransformers import AutoModelForCausalLM,AutoTokenizer
 
4
  from huggingface_hub import snapshot_download,hf_hub_download
5
 
6
  import gradio as gr
@@ -11,7 +12,7 @@ def clear_session():
11
  model = AutoModelForCausalLM.from_pretrained("Cran-May/OpenSLIDE", model_file="SLIDE.0.1.gguf", model_type="mistral", gpu_layers=0)
12
 
13
  model_dir = hf_hub_download(repo_id="OpenBuddy/openbuddy-mistral-7b-v13.1",local_dir="./", filename="tokenizer.model")
14
- tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
15
 
16
  DEFAULT_SYSTEM_PROMPT = """You are a helpful, respectful and honest INTP-T AI Assistant named "Shi-Ci" in English or "兮辞" in Chinese.
17
  You are good at speaking English and Chinese.
 
1
  from gradio_client import Client
2
  from time import sleep
3
+ from ctransformers import AutoModelForCausalLM
4
+ from transformers import AutoTokenizer
5
  from huggingface_hub import snapshot_download,hf_hub_download
6
 
7
  import gradio as gr
 
12
  model = AutoModelForCausalLM.from_pretrained("Cran-May/OpenSLIDE", model_file="SLIDE.0.1.gguf", model_type="mistral", gpu_layers=0)
13
 
14
  model_dir = hf_hub_download(repo_id="OpenBuddy/openbuddy-mistral-7b-v13.1",local_dir="./", filename="tokenizer.model")
15
+ tokenizer = AutoTokenizer.from_pretrained("OpenBuddy/openbuddy-mistral-7b-v13.1")
16
 
17
  DEFAULT_SYSTEM_PROMPT = """You are a helpful, respectful and honest INTP-T AI Assistant named "Shi-Ci" in English or "兮辞" in Chinese.
18
  You are good at speaking English and Chinese.