derek-thomas HF staff commited on
Commit
7beacaa
1 Parent(s): 9f9e321

Minor updates to prompts

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. templates/template.j2 +2 -2
  3. templates/template_html.j2 +6 -6
app.py CHANGED
@@ -85,7 +85,7 @@ with gr.Blocks() as demo:
85
  # Turn it back on
86
  txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
87
 
88
- gr.Examples(['What is the largest city on earth?', 'Who has the record for the fastest mile?'], txt)
89
 
90
  demo.queue()
91
  demo.launch(debug=True)
 
85
  # Turn it back on
86
  txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
87
 
88
+ gr.Examples(['What is the capital of China, I think its Shanghai?', 'Who won the mens world cup in 2014?'], txt)
89
 
90
  demo.queue()
91
  demo.launch(debug=True)
templates/template.j2 CHANGED
@@ -1,8 +1,8 @@
1
  Instructions: Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.
2
  Context:
3
- ---
4
  {% for doc in documents %}
 
5
  {{ doc.content }}
6
- ---
7
  {% endfor %}
8
  Query: {{ query }}
 
1
  Instructions: Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.
2
  Context:
 
3
  {% for doc in documents %}
4
+ ---
5
  {{ doc.content }}
6
+ ---
7
  {% endfor %}
8
  Query: {{ query }}
templates/template_html.j2 CHANGED
@@ -1,9 +1,8 @@
1
  <h2>Prompt</h2>
2
- Below is the prompt that is given to the model. <br><br>
3
- <b>Instructions</b>:
4
  <span style="color: #FF00FF;">Use the following pieces of context to answer the question at the end.<br>If you don't know the answer, just say that you don't know, <span style="color: #FF00FF; font-weight: bold;">don't try to make up an answer.</span></span><br>
5
-
6
- <b>Context</b>:
7
  {% for doc in documents %}
8
  <details class="doc-box">
9
  <summary>
@@ -12,7 +11,8 @@ Below is the prompt that is given to the model. <br><br>
12
  <div class="doc-full">{{ doc.content }}</div>
13
  </details>
14
  {% endfor %}
15
- <b>Query</b>: <span style="color: yellow;">{{ query }}</span>
 
16
 
17
  <style>
18
  .doc-box {
@@ -27,4 +27,4 @@ Below is the prompt that is given to the model. <br><br>
27
  summary::-webkit-details-marker {
28
  color: white;
29
  }
30
- </style>
 
1
  <h2>Prompt</h2>
2
+ Below is the prompt that is given to the model. <hr>
3
+ <h2>Instructions</h2>
4
  <span style="color: #FF00FF;">Use the following pieces of context to answer the question at the end.<br>If you don't know the answer, just say that you don't know, <span style="color: #FF00FF; font-weight: bold;">don't try to make up an answer.</span></span><br>
5
+ <h2>Context</h2>
 
6
  {% for doc in documents %}
7
  <details class="doc-box">
8
  <summary>
 
11
  <div class="doc-full">{{ doc.content }}</div>
12
  </details>
13
  {% endfor %}
14
+
15
+ <h2>Query</h2> <span style="color: yellow;">{{ query }}</span>
16
 
17
  <style>
18
  .doc-box {
 
27
  summary::-webkit-details-marker {
28
  color: white;
29
  }
30
+ </style>