Aspik101 commited on
Commit
3c72607
1 Parent(s): 1b8d93e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -2,6 +2,8 @@ import gradio as gr
2
  import random
3
  import time
4
  from ctransformers import AutoModelForCausalLM
 
 
5
 
6
  params = {
7
  "max_new_tokens":512,
@@ -12,7 +14,9 @@ params = {
12
  "batch_size": 8}
13
 
14
 
15
- llm = AutoModelForCausalLM.from_pretrained("Aspik101/trurl-2-7b-GGML", model_type="llama")
 
 
16
 
17
  with gr.Blocks() as demo:
18
  chatbot = gr.Chatbot()
 
2
  import random
3
  import time
4
  from ctransformers import AutoModelForCausalLM
5
+ from dl_hf_model import dl_hf_model
6
+
7
 
8
  params = {
9
  "max_new_tokens":512,
 
14
  "batch_size": 8}
15
 
16
 
17
+ url = "https://huggingface.co/Aspik101/trurl-2-7b-GGML/blob/main/trurl-2-7b.ggmlv3.q8_0.bin"
18
+ model_loc, file_size = dl_hf_model(url)
19
+ llm = AutoModelForCausalLM.from_pretrained(model_loc, model_type="llama")
20
 
21
  with gr.Blocks() as demo:
22
  chatbot = gr.Chatbot()