Kukedlc commited on
Commit
eb361a5
1 Parent(s): 25593e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -4,7 +4,13 @@ from llama_cpp import Llama
4
  llm = Llama(model_path="model.gguf", n_ctx=8000, n_threads=2, chat_format="chatml")
5
 
6
  def generate(message, history,temperature=0.3,max_tokens=512):
7
- system_prompt = """You are a super Inteligent AI assistant in SQL ANSI coding."""
 
 
 
 
 
 
8
  formatted_prompt = [{"role": "system", "content": system_prompt}]
9
  for user_prompt, bot_response in history:
10
  formatted_prompt.append({"role": "user", "content": user_prompt})
@@ -23,7 +29,7 @@ avatar_images=["user.png", "botnb.png"], bubble_full_width=False, show_label=Fal
23
  iface = gr.ChatInterface(fn=generate, chatbot=mychatbot, retry_btn=None, undo_btn=None)
24
 
25
  with gr.Blocks() as demo:
26
- gr.HTML("<center><h1>Natural SQL</h1></center>")
27
  iface.render()
28
 
29
  demo.queue().launch(show_api=False, server_name="0.0.0.0")
 
4
  llm = Llama(model_path="model.gguf", n_ctx=8000, n_threads=2, chat_format="chatml")
5
 
6
  def generate(message, history,temperature=0.3,max_tokens=512):
7
+ system_prompt = """You are a super Inteligent AI assistant.
8
+ I want you to think smartly, step by step.
9
+ Once you've thought through things step by step, check the responses
10
+ before issuing them. I want you to answer clearly, accurately,
11
+ and without any unnecessary words. I want you to be concise and provide exact answers,
12
+ with known data, without making things up. You're called "Little Llama",
13
+ you're a language model that was compressed but you're still the smartest!"""
14
  formatted_prompt = [{"role": "system", "content": system_prompt}]
15
  for user_prompt, bot_response in history:
16
  formatted_prompt.append({"role": "user", "content": user_prompt})
 
29
  iface = gr.ChatInterface(fn=generate, chatbot=mychatbot, retry_btn=None, undo_btn=None)
30
 
31
  with gr.Blocks() as demo:
32
+ gr.HTML("<center><h1>Llama 13b - GGUF Q_4_K_M</h1></center>")
33
  iface.render()
34
 
35
  demo.queue().launch(show_api=False, server_name="0.0.0.0")