BlinkDL commited on
Commit
6e2a0af
1 Parent(s): c4a208a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -1
app.py CHANGED
@@ -90,6 +90,28 @@ examples = [
90
  ["Assistant: How can we persuade Elon Musk to follow you on Twitter? Let's think step by step and provide an expert response.", 333, 1, 0.3, 0, 1],
91
  [generate_prompt("東京で訪れるべき素晴らしい場所とその紹介をいくつか挙げてください。"), 333, 1, 0.3, 0, 1],
92
  [generate_prompt("Write a story using the following information.", "A man named Alex chops a tree down."), 333, 1, 0.3, 0, 1],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  ["A few light taps upon the pane made her turn to the window. It had begun to snow again.", 333, 1, 0.3, 0, 1],
94
  ['''Edward: I am Edward Elric from Fullmetal Alchemist.
95
 
@@ -128,7 +150,7 @@ with gr.Blocks(title=title) as demo:
128
  submit = gr.Button("Submit", variant="primary")
129
  clear = gr.Button("Clear", variant="secondary")
130
  output = gr.Textbox(label="Output", lines=5)
131
- data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples, label="Example Instructions", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
132
  submit.click(evaluate, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
133
  clear.click(lambda: None, [], [output])
134
  data.click(lambda x: x, [data], [prompt, token_count, temperature, top_p, presence_penalty, count_penalty])
 
90
  ["Assistant: How can we persuade Elon Musk to follow you on Twitter? Let's think step by step and provide an expert response.", 333, 1, 0.3, 0, 1],
91
  [generate_prompt("東京で訪れるべき素晴らしい場所とその紹介をいくつか挙げてください。"), 333, 1, 0.3, 0, 1],
92
  [generate_prompt("Write a story using the following information.", "A man named Alex chops a tree down."), 333, 1, 0.3, 0, 1],
93
+ ['''Instruction: You are an expert assistant for summarizing and extracting insights from sales call transcripts. Generate a valid JSON in the following format:
94
+ {
95
+ "summary": "Summary of the call transcript. ",
96
+ "products": ["product 1", "product 2"],
97
+ "rep_name": "Name of the sales rep",
98
+ "prospect_name": "Name of the prospect",
99
+ "action_items": ["action item 1", "action item 2"],
100
+ }
101
+
102
+ Input: John: Hello, this is John.
103
+ Sarah: Hi John, this is Sarah from XYZ Company. I'm calling to discuss our new product, the XYZ Widget, and see if it might be a good fit for your business.
104
+ John: Hi Sarah, thanks for reaching out. I'm definitely interested in learning more about the XYZ Widget. Can you give me a quick overview of what it does?
105
+ Sarah: Of course! The XYZ Widget is a cutting-edge tool that helps businesses streamline their workflow and improve productivity.
106
+ John: That sounds really interesting. I can see how that could benefit our team. Do you have any case studies or success stories from other companies who have used the XYZ Widget?
107
+ Sarah: Absolutely, we have several case studies that I can share with you. I'll send those over along with some additional information about the product. I'd also love to schedule a demo for you and your team to see the XYZ Widget in action.
108
+ John: That would be great. I'll make sure to review the case studies and then we can set up a time for the demo. In the meantime, are there any specific action items or next steps we should take?
109
+ Sarah: Yes, I'll send over the information and then follow up with you to schedule the demo. In the meantime, feel free to reach out if you have any questions or need further information.
110
+ John: Sounds good, I appreciate your help Sarah. I'm looking forward to learning more about the XYZ Widget and seeing how it can benefit our business.
111
+ Sarah: Thank you, John.
112
+ John: You too, bye.
113
+
114
+ Response:''', 333, 1, 0, 0, 0],
115
  ["A few light taps upon the pane made her turn to the window. It had begun to snow again.", 333, 1, 0.3, 0, 1],
116
  ['''Edward: I am Edward Elric from Fullmetal Alchemist.
117
 
 
150
  submit = gr.Button("Submit", variant="primary")
151
  clear = gr.Button("Clear", variant="secondary")
152
  output = gr.Textbox(label="Output", lines=5)
153
+ data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples, samples_per_page=50, label="Example Instructions", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
154
  submit.click(evaluate, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
155
  clear.click(lambda: None, [], [output])
156
  data.click(lambda x: x, [data], [prompt, token_count, temperature, top_p, presence_penalty, count_penalty])