He Bo commited on
Commit
50ee34c
1 Parent(s): e4ac351
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -51,6 +51,17 @@ Please automatically generate FAQs based on these document fragments, with answe
51
  The Question and Answer are:
52
  """
53
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  def get_answer(question,session_id,language,prompt,index,top_k,temperature):
56
 
@@ -210,7 +221,7 @@ with demo:
210
  summarize_button = gr.Button("Summit")
211
  sm_language_radio = gr.Radio(["chinese", "english"],value="chinese",label="Language")
212
  sm_llm_radio = gr.Radio(["2x", "8x"],value="2x",label="Chinese llm instance")
213
- sm_prompt_textbox = gr.Textbox(label="Prompt",lines=4, placeholder=zh_prompt_template)
214
  with gr.Column():
215
  text_output = gr.Textbox()
216
 
 
51
  The Question and Answer are:
52
  """
53
 
54
+ EN_SUMMARIZE_PROMPT_TEMPLATE = """
55
+ Here is one page of aws's manual document
56
+ ```
57
+ {text}
58
+ ```
59
+ Please automatically generate as many questions as possible based on this manual document, and follow these rules:
60
+ 1. "aws" should be contained in every question
61
+ 2. questions start with "Question:"
62
+ 3. answers begin with "Answer:"
63
+ """
64
+
65
 
66
  def get_answer(question,session_id,language,prompt,index,top_k,temperature):
67
 
 
221
  summarize_button = gr.Button("Summit")
222
  sm_language_radio = gr.Radio(["chinese", "english"],value="chinese",label="Language")
223
  sm_llm_radio = gr.Radio(["2x", "8x"],value="2x",label="Chinese llm instance")
224
+ sm_prompt_textbox = gr.Textbox(label="Prompt",lines=4, placeholder=EN_SUMMARIZE_PROMPT_TEMPLATE)
225
  with gr.Column():
226
  text_output = gr.Textbox()
227