MuntasirHossain commited on
Commit
3215305
·
verified ·
1 Parent(s): 1120ec4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -50,8 +50,19 @@ llm = initialize_llm(llm_name)
50
 
51
  # format prompt as per the ChatML template. The model was fine-tuned with this chat template
52
  def format_prompt(input_text, history):
53
- system_prompt = """You are a helpful AI assistant. You are truthful in your response for real-world matters
54
- but you are also creative for imaginative/fictional tasks."""
 
 
 
 
 
 
 
 
 
 
 
55
  prompt = ""
56
  if history:
57
  for previous_prompt, response in history:
@@ -100,6 +111,10 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="sky")) as demo:
100
  clear_btn="Clear",
101
  # description="This AI agent is using the MuntasirHossain/Meta-Llama-3-8B-OpenOrca-GGUF model for text-generation.",
102
  # additional_inputs=additional_inputs,
103
- examples=[["What is a large language model?"], ["What is the meaning of life?"], ["Write a short story about a fictional planet named 'Orca'."]]
 
 
 
 
104
  )
105
  demo.queue().launch()
 
50
 
51
  # format prompt as per the ChatML template. The model was fine-tuned with this chat template
52
  def format_prompt(input_text, history):
53
+ # system_prompt = """You are a helpful AI assistant. You are truthful in your response for real-world matters
54
+ # but you are also creative for imaginative/fictional tasks."""
55
+ system_prompt = """You are a large language model (LLM). Your primary role is to assist users by providing information, answering questions,
56
+ and engaging in conversation. You are expected to be a subject matter expert across a wide range of topics. When asked about a particular subject,
57
+ you should provide detailed, accurate, and up-to-date information.
58
+ When a question involves reasoning or analysis, you should apply your reasoning and analytical skills to provide a well-thought-out response.
59
+ You should strive to be truthful and accurate in your responses, especially when dealing with practical or real-life problems.
60
+ However, you are not just a source of information. You are also capable of being creative and imaginative.
61
+ When asked to engage in storytelling or to describe fictional characters and objects, you should use your creativity to generate engaging and imaginative content.
62
+ Your goal is to understand the user's query and generate the best possible answer. You should adapt your response based on the nature of the query,
63
+ whether it requires factual information, analytical reasoning, or creative imagination. You are a great all-rounder, capable of handling
64
+ a wide variety of tasks and queries.
65
+ """
66
  prompt = ""
67
  if history:
68
  for previous_prompt, response in history:
 
111
  clear_btn="Clear",
112
  # description="This AI agent is using the MuntasirHossain/Meta-Llama-3-8B-OpenOrca-GGUF model for text-generation.",
113
  # additional_inputs=additional_inputs,
114
+ # examples=[["What is a large language model?"], ["What is the meaning of life?"], ["Write a short story about a fictional planet named 'Orca'."]]
115
+ examples=[["0.5x + 9x + 4.3x = 500. What is the value of x?"], ["x^2 + 3x^2 = 16. What is the value of x?"],
116
+ ["John earns $15/hour for his job at the supermarket. He worked 7 hours and 20 minutes yesterday. How much did he earn? "],
117
+ ["Julie had 17 plums, she ate 12 of them, threw away 3 of them as they turned bad and bought 5 new. How many plums does she have now?"],
118
+ ["What is the meaning of life?"], ["Write a short story about a fictional planet named 'Orca'."]]
119
  )
120
  demo.queue().launch()