Hakyung Sung commited on
Commit
04c9731
·
1 Parent(s): 7cabc55

Correct app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -190,20 +190,29 @@ def process_text(input_text):
190
  return get_highlighted_text(doc)
191
 
192
  # Define a simpler sample text.
193
- sample_text = "Nancy sliced the tire open."
 
 
 
 
 
 
 
 
 
194
 
195
  def fill_sample_text():
196
  return sample_text
197
 
198
  # Build the Gradio interface.
199
  with gr.Blocks() as demo:
200
- gr.Markdown("# ASC Tagger Demo")
201
  gr.Markdown("Enter some text to have ASCs tagged. Use the button below to fill in sample text.")
202
 
203
  # The input textbox is not modified by submission.
204
  input_textbox = gr.Textbox(lines=5, label="Input Text", placeholder="Enter text here...")
205
  output_html = gr.HTML(label="Tagged Text")
206
- fill_btn = gr.Button("Fill Sample Text")
207
  tag_btn = gr.Button("Tag ASCs")
208
 
209
  fill_btn.click(fn=fill_sample_text, inputs=[], outputs=input_textbox)
 
190
  return get_highlighted_text(doc)
191
 
192
  # Define a simpler sample text.
193
+ sample_text = (
194
+ "Nancy sliced the tire open, revealing its hidden inner layers. "
195
+ "With a steady hand and precise timing, she used a specially designed tool to cut through the stubborn rubber. "
196
+ "The tire, which had long been criticized for its premature wear, was examined closely by her team after being sliced open by Nancy. "
197
+ "Under the dim glow of the workshop lights, every careful stroke of the blade echoed her determination to uncover the truth. "
198
+ "Pressured by a looming deadline, Nancy repeated the process on another tire, ensuring that no defect escaped her scrutiny. "
199
+ "While some of her colleagues preferred following conventional procedures, she boldly argued that direct intervention was the most effective method. "
200
+ "By slicing the tire open, Nancy not only exposed the underlying damage but also revealed unexpected patterns of wear that puzzled even experienced mechanics. "
201
+ "Moreover, her innovative approach prompted heated discussions among her peers, ultimately leading to a complete re-evaluation of standard repair practices."
202
+ )
203
 
204
  def fill_sample_text():
205
  return sample_text
206
 
207
  # Build the Gradio interface.
208
  with gr.Blocks() as demo:
209
+ gr.Markdown("# ASC tagger demo")
210
  gr.Markdown("Enter some text to have ASCs tagged. Use the button below to fill in sample text.")
211
 
212
  # The input textbox is not modified by submission.
213
  input_textbox = gr.Textbox(lines=5, label="Input Text", placeholder="Enter text here...")
214
  output_html = gr.HTML(label="Tagged Text")
215
+ fill_btn = gr.Button("Fill sample text")
216
  tag_btn = gr.Button("Tag ASCs")
217
 
218
  fill_btn.click(fn=fill_sample_text, inputs=[], outputs=input_textbox)