giulio98 commited on
Commit
dd34ece
·
verified ·
1 Parent(s): 341834f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -56,16 +56,21 @@ sink_tokens = max(4, len(tokenizer.encode(prefix)))
56
 
57
  # Default prompt content.
58
  default_task_description = (
59
- "Answer the question based on the given passages. "
60
- "Only give me the answer and do not output any other words."
61
  )
62
  default_few_shot = """Examples
63
- question: Which case was brought to court first Miller v. California or Gates v. Collier ?
64
- answer: Miller v. California
65
- question: The actor that plays Phileas Fogg in "Around the World in 80 Days", co-starred with Gary Cooper in a 1939 Goldwyn Productions film based on a novel by what author?
66
- answer: Charles L. Clifford
67
- question: Prior to playing for Michigan State, Keith Nichol played football for a school located in what city?
68
- answer: Norman
 
 
 
 
 
69
  """
70
 
71
  CHROMA_DB_DIR = "./chroma_db"
 
56
 
57
  # Default prompt content.
58
  default_task_description = (
59
+ "Answer the question based on the provided context."
60
+ "Provide only the answer and no additional explanations."
61
  )
62
  default_few_shot = """Examples
63
+ context: Climate change is primarily driven by human activities such as burning fossil fuels, deforestation, and industrial processes, which release large amounts of greenhouse gases into the atmosphere, causing global temperatures to rise.
64
+ question: What are the main human activities contributing to climate change?
65
+ answer: The main human activities contributing to climate change include burning fossil fuels, deforestation, and various industrial processes that emit greenhouse gases.
66
+
67
+ context: The Renaissance was a cultural movement spanning roughly from the 14th to the 17th century, marked by renewed interest in classical learning and values, advancements in art, literature, and scientific inquiry, and significant cultural developments.
68
+ question: What characterized the Renaissance period?
69
+ answer: The Renaissance period was characterized by a revival of classical learning, significant advancements in art and literature, and notable developments in scientific inquiry and cultural values.
70
+
71
+ context: The theory of evolution by natural selection, proposed by Charles Darwin, explains how species adapt and evolve over generations based on the survival and reproduction of individuals best suited to their environment.
72
+ question: How does Darwin's theory of evolution explain the adaptation of species?
73
+ answer: Darwin's theory explains that species adapt and evolve through natural selection, where individuals best suited to their environment are more likely to survive and reproduce.
74
  """
75
 
76
  CHROMA_DB_DIR = "./chroma_db"