osanseviero commited on
Commit
f3fece9
1 Parent(s): bff897b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -10,6 +10,8 @@ description = "Gradio Demo for BLOOM. To use it, simply add your text, or click
10
  API_URL = "https://hfbloom.ngrok.io/generate"
11
  HF_API_TOKEN = os.getenv("HF_API_TOKEN")
12
 
 
 
13
 
14
  examples = [
15
  ['A "whatpu" is a small, furry animal native to Tanzania. An example of a sentence that uses the word whatpu is: We were traveling in Africa and we saw these very cute whatpus. To do a "farduddle" means to jump up and down really fast. An example of a sentence that uses the word farduddle is:']
@@ -53,4 +55,7 @@ gr.Interface(
53
  examples=examples,
54
  # article=article,
55
  title=title,
56
- description=description).launch(enable_queue=True)
 
 
 
 
10
  API_URL = "https://hfbloom.ngrok.io/generate"
11
  HF_API_TOKEN = os.getenv("HF_API_TOKEN")
12
 
13
+ hf_writer = gr.HuggingFaceDatasetSaver(HF_API_TOKEN, "huggingface/bloom_internal_prompts", organization="huggingface")
14
+
15
 
16
  examples = [
17
  ['A "whatpu" is a small, furry animal native to Tanzania. An example of a sentence that uses the word whatpu is: We were traveling in Africa and we saw these very cute whatpus. To do a "farduddle" means to jump up and down really fast. An example of a sentence that uses the word farduddle is:']
 
55
  examples=examples,
56
  # article=article,
57
  title=title,
58
+ description=description,
59
+ flagging_options=["save"],
60
+ flagging_callback=hf_writer
61
+ ).launch()