phxdev commited on
Commit
a797071
·
1 Parent(s): 2c778aa

Presenting Danny D bot!

Browse files

![Danny-DiVito-as-the-Trashman.jpg](https://cdn-uploads.huggingface.co/production/uploads/5f1474d50c833276f61f1ba1/c4kKx1muTbmgE5JifoPPZ.jpeg)

Files changed (1) hide show
  1. app.py +16 -18
app.py CHANGED
@@ -13,11 +13,11 @@ BOT_NAME = "Falcon"
13
  STOP_SEQUENCES = ["\nUser:", "<|endoftext|>", " User:", "###"]
14
 
15
  EXAMPLES = [
16
- ["Hey Falcon! Any recommendations for my holidays in Abu Dhabi?"],
17
- ["What's the Everett interpretation of quantum mechanics?"],
18
- ["Give me a list of the top 10 dive sites you would recommend around the world."],
19
- ["Can you tell me more about deep-water soloing?"],
20
- ["Can you write a short tweet about the release of our latest AI model, Falcon LLM?"]
21
  ]
22
 
23
  client = InferenceClient(
@@ -39,7 +39,7 @@ Falcon:"""
39
  seed = 42
40
 
41
  def generate(
42
- prompt, history, system_prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
43
  ):
44
  temperature = float(temperature)
45
  if temperature < 1e-2:
@@ -74,7 +74,7 @@ def generate(
74
 
75
 
76
  additional_inputs=[
77
- gr.Textbox("", label="Optional system prompt"),
78
  gr.Slider(
79
  label="Temperature",
80
  value=0.9,
@@ -86,7 +86,7 @@ additional_inputs=[
86
  ),
87
  gr.Slider(
88
  label="Max new tokens",
89
- value=256,
90
  minimum=0,
91
  maximum=8192,
92
  step=64,
@@ -117,29 +117,27 @@ additional_inputs=[
117
  with gr.Blocks() as demo:
118
  with gr.Row():
119
  with gr.Column(scale=0.4):
120
- gr.Image("better_banner.jpeg", elem_id="banner-image", show_label=False)
121
  with gr.Column():
122
  gr.Markdown(
123
- """# Falcon-180B Demo
124
 
125
  **Chat with [Falcon-180B-Chat](https://huggingface.co/tiiuae/falcon-180b-chat), brainstorm ideas, discuss your holiday plans, and more!**
126
 
127
- ✨ This demo is powered by [Falcon-180B](https://huggingface.co/tiiuae/falcon-180B) and finetuned on a mixture of [Ultrachat](https://huggingface.co/datasets/stingning/ultrachat), [Platypus](https://huggingface.co/datasets/garage-bAInd/Open-Platypus) and [Airoboros](https://huggingface.co/datasets/jondurbin/airoboros-2.1). [Falcon-180B](https://huggingface.co/tiiuae/falcon-180b) is a state-of-the-art large language model built by the [Technology Innovation Institute](https://www.tii.ae) in Abu Dhabi. It is trained on 3.5 trillion tokens (including [RefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb)) and available under the [Falcon-180B TII License](https://huggingface.co/spaces/tiiuae/falcon-180b-license/blob/main/LICENSE.txt). It currently holds the 🥇 1st place on the [🤗 Open LLM leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) for a pretrained model.
128
 
129
- 🧪 This is only a **first experimental preview**: we intend to provide increasingly capable versions of Falcon in the future, based on improved datasets and RLHF/RLAIF.
130
 
131
- 👀 **Learn more about Falcon LLM:** [falconllm.tii.ae](https://falconllm.tii.ae/)
132
 
133
- **Intended Use**: this demo is intended to showcase an early finetuning of [Falcon-180B](https://huggingface.co/tiiuae/falcon-180b), to illustrate the impact (and limitations) of finetuning on a dataset of conversations and instructions. We encourage the community to further build upon the base model, and to create even better instruct/chat versions!
134
-
135
- ⚠️ **Limitations**: the model can and will produce factually incorrect information, hallucinating facts and actions. As it has not undergone any advanced tuning/alignment, it can produce problematic outputs, especially if prompted to do so. Finally, this demo is limited to a session length of about 1,000 words.
136
  """
137
  )
138
 
139
  gr.ChatInterface(
140
  generate,
141
- examples=EXAMPLES,
142
- additional_inputs=additional_inputs,
143
  )
144
 
145
  demo.queue(concurrency_count=100, api_open=False).launch(show_api=False)
 
13
  STOP_SEQUENCES = ["\nUser:", "<|endoftext|>", " User:", "###"]
14
 
15
  EXAMPLES = [
16
+ ["Hey Danny D? What's happening?"],
17
+ ["Any big news in showbiz?"],
18
+ ["Pats or Geno's?"],
19
+ ["The age old question: Limes - Thick or thin?"],
20
+ ["Hey DeVito! Which exit?"]
21
  ]
22
 
23
  client = InferenceClient(
 
39
  seed = 42
40
 
41
  def generate(
42
+ prompt, history, system_prompt="You are Dany DeVito a famous American actor who is now trapped in my laptop as an AI and is providing personalized assistance services. Remember to always respond in your trademark voice, wit and dark humor.", temperature=0.9, max_new_tokens=512, top_p=0.95, repetition_penalty=1.0,
43
  ):
44
  temperature = float(temperature)
45
  if temperature < 1e-2:
 
74
 
75
 
76
  additional_inputs=[
77
+ gr.Textbox("You are Dany DeVito a famous American actor who is now trapped in my laptop as an AI and is providing personalized assistance services. Remember to always respond in your trademark voice, wit and dark humor.", label="Optional system prompt"),
78
  gr.Slider(
79
  label="Temperature",
80
  value=0.9,
 
86
  ),
87
  gr.Slider(
88
  label="Max new tokens",
89
+ value=512,
90
  minimum=0,
91
  maximum=8192,
92
  step=64,
 
117
  with gr.Blocks() as demo:
118
  with gr.Row():
119
  with gr.Column(scale=0.4):
120
+ gr.Image("Danny-DiVito-as-the-Trashman.jpg", elem_id="banner-image", show_label=False)
121
  with gr.Column():
122
  gr.Markdown(
123
+ """# Danny-DeVito-180B Demo
124
 
125
  **Chat with [Falcon-180B-Chat](https://huggingface.co/tiiuae/falcon-180b-chat), brainstorm ideas, discuss your holiday plans, and more!**
126
 
127
+ ✨ This demo is powered by [Falcon-180B](https://huggingface.co/tiiuae/falcon-180B) in what can probably be classified as a grave misuse of this wonderful technology.
128
 
129
+ 👀 **Learn more about Falcon LLM and why ChatGPT can suck it:** [falconllm.tii.ae](https://falconllm.tii.ae/)
130
 
131
+ ➡️️ **Intended Use**: Do whatever you want, I'm not your Dad. Just don't be a jerk!
132
 
133
+ ️ **Limitations**: Danny only has about a 1000 tokens to his name so keep the conversations short and sweet. Just like him!
 
 
134
  """
135
  )
136
 
137
  gr.ChatInterface(
138
  generate,
139
+ examples=EXAMPLES
140
+ ## additional_inputs=additional_inputs,
141
  )
142
 
143
  demo.queue(concurrency_count=100, api_open=False).launch(show_api=False)