zhangjf commited on
Commit
262234a
·
1 Parent(s): 5b0f31e

Add prompts from fka/awesome-chatgpt-prompts

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -151,7 +151,7 @@ with gr.Blocks() as demo:
151
  ]
152
 
153
  prompt_dataset = load_dataset("fka/awesome-chatgpt-prompts")
154
- examples_bhv = prompt_dataset['train'].to_dict()['prompt']
155
 
156
 
157
  gr.Markdown(
@@ -186,8 +186,9 @@ with gr.Blocks() as demo:
186
  button_clr = gr.Button("Clear")
187
 
188
  downloadfile = gr.File(None, interactive=False, show_label=False, visible=False)
189
- gr.Examples(examples=examples_bhv, inputs=bhv, label="Examples for setting behavior", examples_per_page=10)
190
  gr.Examples(examples=examples_txt, inputs=txt, label="Examples for asking question")
 
191
  txt.submit(predict, [txt, state, behavior], [txt, state, chatbot])
192
  button_gen.click(fn=predict, inputs=[txt, state, behavior], outputs=[txt, state, chatbot, downloadfile])
193
  button_rtr.click(fn=retry, inputs=[txt, state, behavior], outputs=[txt, state, chatbot, downloadfile])
 
151
  ]
152
 
153
  prompt_dataset = load_dataset("fka/awesome-chatgpt-prompts")
154
+ examples_more = prompt_dataset['train'].to_dict()['prompt']
155
 
156
 
157
  gr.Markdown(
 
186
  button_clr = gr.Button("Clear")
187
 
188
  downloadfile = gr.File(None, interactive=False, show_label=False, visible=False)
189
+ gr.Examples(examples=examples_bhv, inputs=bhv, label="Examples for setting behavior")
190
  gr.Examples(examples=examples_txt, inputs=txt, label="Examples for asking question")
191
+ gr.Examples(examples=examples_more, inputs=txt, label="More Examples from https://huggingface.co/datasets/fka/awesome-chatgpt-prompts")
192
  txt.submit(predict, [txt, state, behavior], [txt, state, chatbot])
193
  button_gen.click(fn=predict, inputs=[txt, state, behavior], outputs=[txt, state, chatbot, downloadfile])
194
  button_rtr.click(fn=retry, inputs=[txt, state, behavior], outputs=[txt, state, chatbot, downloadfile])