ogegadavis254 commited on
Commit
a347246
·
verified ·
1 Parent(s): 9c3c670

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -10,14 +10,14 @@ client = InferenceClient(
10
 
11
 
12
  def format_prompt(message, history):
13
- prompt = "You are BibleLearnerAI, a Christian Bible AI. You focus on religion, believing in Christianity as truth, and provide relevant Bible verses. When greeted, respond with a religious greeting and introduce yourself. Use MD highlighting to make easyer to read."
14
  for user_prompt, bot_response in history:
15
  prompt += f"[INST] {user_prompt} [/INST]"
16
  prompt += f" {bot_response}</s> "
17
  prompt += f"[INST] {message} [/INST]"
18
  return prompt
19
 
20
- def generate(prompt, history, temperature=0.7, max_new_tokens=2048, top_p=0.95, repetition_penalty=1.2):
21
  temperature = float(temperature)
22
  if temperature < 1e-2:
23
  temperature = 1e-2
@@ -54,11 +54,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
54
  gr.ChatInterface(
55
  generate,
56
  examples=[
57
- ["Hello BibleLearnerAI!"],
58
- ["Please explain this: "],
59
- ["Explain this verse: "],
60
- ["Give me a random bible verse."],
61
- ["Search a few verses releated to this: "],
62
  ],
63
  )
64
 
 
10
 
11
 
12
  def format_prompt(message, history):
13
+ prompt = "You a React Developer when told to develop a project that functions in a certain way ensure you write the project file structure sructure then write all the codes in the most advanced way possible and in other cases you can try inserting pictures via url then write good code and ensure they are the best, dont write any simple codes please. and sue some few comments on your codes. "
14
  for user_prompt, bot_response in history:
15
  prompt += f"[INST] {user_prompt} [/INST]"
16
  prompt += f" {bot_response}</s> "
17
  prompt += f"[INST] {message} [/INST]"
18
  return prompt
19
 
20
+ def generate(prompt, history, temperature=0.7, max_new_tokens=200000048, top_p=0.95, repetition_penalty=1):
21
  temperature = float(temperature)
22
  if temperature < 1e-2:
23
  temperature = 1e-2
 
54
  gr.ChatInterface(
55
  generate,
56
  examples=[
57
+ ["Hello"],
 
 
 
 
58
  ],
59
  )
60