multimodalart HF Staff commited on
Commit
0717dfc
·
verified ·
1 Parent(s): c321bcc

Use real human/AI dataset rows as examples

Browse files
Files changed (1) hide show
  1. app.py +17 -14
app.py CHANGED
@@ -73,23 +73,26 @@ def analyze(text):
73
  return summary, label_probs
74
 
75
 
 
 
76
  HUMAN_EXAMPLE = (
77
- "Frankly I never understood the appeal of camping. You pay money to sleep on the "
78
- "ground, get bitten by things, and cook food worse than what you'd make at home. "
79
- "My wife loves it though so every year we go, and every year I complain, and "
80
- "every year she reminds me that I said the exact same thing last time. I suppose "
81
- "that's marriage. We've got a tent older than our youngest kid and a cooler that "
82
- "doesn't really keep things cold anymore, but nobody's allowed to replace either."
 
83
  )
84
 
85
  AI_EXAMPLE = (
86
- "In today's fast-paced world, effective time management has become an "
87
- "indispensable skill for achieving both personal and professional success. By "
88
- "prioritizing tasks, setting clear goals, and minimizing distractions, "
89
- "individuals can significantly enhance their productivity. Moreover, leveraging "
90
- "modern tools and techniques allows for a more streamlined workflow. Ultimately, "
91
- "mastering time management empowers people to lead more balanced and fulfilling "
92
- "lives while maximizing their overall efficiency and well-being."
93
  )
94
 
95
  with gr.Blocks(title="EditLens") as demo:
@@ -118,7 +121,7 @@ with gr.Blocks(title="EditLens") as demo:
118
  gr.Examples(
119
  examples=[[HUMAN_EXAMPLE], [AI_EXAMPLE]],
120
  inputs=text_in,
121
- label="Examples (human-style / AI-style)",
122
  )
123
  with gr.Column():
124
  summary_out = gr.Markdown()
 
73
  return summary, label_probs
74
 
75
 
76
+ # Both examples are real rows from the EditLens test set (pangram/editlens_iclr),
77
+ # not text written for this demo — a human_written review and an ai_generated review.
78
  HUMAN_EXAMPLE = (
79
+ "We enjoyed our first visit to enroute coffee. Place was very easy to find and "
80
+ "had a very warm and cozy feel for the place. Walking in you quickly view the "
81
+ "delicious looking pastries they have lined up along the counter. Trying those "
82
+ "next visit. They had a large section of coffee choices and looks like they sell "
83
+ "additional merchandise. Giving them a 5 for outstanding 1st impression.\n\n"
84
+ "Note for owner: possible define the cash register station or separate it a bit "
85
+ "more from coffee pickup station. Seemed a bit crowded in that area."
86
  )
87
 
88
  AI_EXAMPLE = (
89
+ "McDonald’s offers a consistent fast-food experience with widely recognized "
90
+ "favorites like the Big Mac, fries, and McNuggets. The service is generally "
91
+ "quick, and the menu provides options for breakfast, lunch, and dinner, as well "
92
+ "as some healthier choices. While the food isn’t gourmet, it’s reliably "
93
+ "tasty and convenient, making it a popular choice for people on the go. Prices "
94
+ "are reasonable, but quality can vary slightly between locations. Overall, "
95
+ "McDonald’s delivers on expectations for fast, accessible, and familiar meals."
96
  )
97
 
98
  with gr.Blocks(title="EditLens") as demo:
 
121
  gr.Examples(
122
  examples=[[HUMAN_EXAMPLE], [AI_EXAMPLE]],
123
  inputs=text_in,
124
+ label="Examples (real human-written / AI-generated reviews from the EditLens test set)",
125
  )
126
  with gr.Column():
127
  summary_out = gr.Markdown()