zac commited on
Commit
dcfcd56
·
1 Parent(s): a0c6b2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ from huggingface_hub import hf_hub_download #load from huggingfaces
8
 
9
  llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Instruct-GGML", filename="vigogne-2-7b-instruct.ggmlv3.q4_1.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
10
 
11
- description = " Bro i dont want learn! i just want results "
12
  def generate_text(input_text):
13
  output = llm(f"Q: {input_text} \n A:", max_tokens=521, stop=["Q:", "\n"], echo=True,)
14
  return output['choices'][0]['text']
@@ -17,6 +17,6 @@ def generate_text(input_text):
17
  input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
18
  output_text = gr.outputs.Textbox(label="Output text")
19
 
20
- demo = gr.Interface(fn=generate_text, inputs=input_text, outputs=output_text, title="Running Llama on CPU is Hard", description=description, examples=examples)
21
  demo.queue()
22
  demo.launch()
 
8
 
9
  llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Instruct-GGML", filename="vigogne-2-7b-instruct.ggmlv3.q4_1.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
10
 
11
+ description = " Bro i dont want learn! i just want results(https://github.com/abetlen/llama-cpp-python)"
12
  def generate_text(input_text):
13
  output = llm(f"Q: {input_text} \n A:", max_tokens=521, stop=["Q:", "\n"], echo=True,)
14
  return output['choices'][0]['text']
 
17
  input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
18
  output_text = gr.outputs.Textbox(label="Output text")
19
 
20
+ demo = gr.Interface(fn=generate_text, inputs=input_text, outputs=output_text, title="Running Llama on CPU is Hard", description=description)
21
  demo.queue()
22
  demo.launch()