Monster commited on
Commit
c97127b
1 Parent(s): 95d4210

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import gradio as gr
2
- from nomic.gpt4all import GPT4All
 
3
 
4
- m = GPT4All()
5
- m.open()
 
6
 
7
  def chat(input):
8
- return m.prompt(input)
9
 
10
  gr.Interface(fn=chat, inputs="text", outputs="text").launch()
 
1
  import gradio as gr
2
+ from llama_cpp import Llama
3
+ from huggingface_hub import hf_hub_download
4
 
5
+ hf_hub_download(repo_id="LLukas22/gpt4all-lora-quantized-ggjt", filename="ggjt-model.bin", local_dir=".")
6
+
7
+ llm = Llama(model_path="./ggjt-model.bin")
8
 
9
  def chat(input):
10
+ return llm(input)
11
 
12
  gr.Interface(fn=chat, inputs="text", outputs="text").launch()