Sibinraj commited on
Commit
b81313d
·
verified ·
1 Parent(s): 73b9485

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -97,14 +97,10 @@ def handle_input(input_type, text, pdf, max_length, show_length):
97
  return summarize_text(extracted_text, max_length, show_length)
98
 
99
 
 
100
  examples_text = [
101
- ['The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.'],
102
- ['#Person1#: Is this the workshop to prepare for an interview? #Person2#: This is the interview class. Welcome to our class. #Person1#: I am really excited to be taking this workshop so that I can get ready for my interview next week. #Person2#: We are all learning things that will help us in our interview. What do you think are some important considerations going into your interview? #Person1#: I think that we should dress neatly and appropriately. #Person2#: Yes. Second, as you can imagine, attitude and friendliness go a long way. #Person1#: Yes, and I always feel much better when I am friendly. #Person2#: Believe it or not, the interviewers are as interested in your questions as they are in your answers. #Person1#: Any more hints as to what I should do in an interview? #Person2#: Always be honest with your answers. The interviewers really do want to know if you will be a good fit for them.']
103
- ]
104
-
105
- examples_pdf = [
106
- ['example1.pdf', 50],
107
- ['example2.pdf', 50]
108
  ]
109
 
110
  # Define the Gradio interface
@@ -119,7 +115,7 @@ interface = gr.Interface(
119
  ],
120
  outputs=gr.Textbox(label='Summarized Text'),
121
  title='Text or PDF Summarizer using T5-finetuned-dialogue_sumxx',
122
- examples=[examples_text, examples_pdf]
123
 
124
  )
125
 
 
97
  return summarize_text(extracted_text, max_length, show_length)
98
 
99
 
100
+ # Define examples for text input
101
  examples_text = [
102
+ ['Text', 'The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.', None, 50, False],
103
+ ['Text', '#Person1#: Is this the workshop to prepare for an interview? #Person2#: This is the interview class. Welcome to our class. #Person1#: I am really excited to be taking this workshop so that I can get ready for my interview next week. #Person2#: We are all learning things that will help us in our interview. What do you think are some important considerations going into your interview? #Person1#: I think that we should dress neatly and appropriately. #Person2#: Yes. Second, as you can imagine, attitude and friendliness go a long way. #Person1#: Yes, and I always feel much better when I am friendly. #Person2#: Believe it or not, the interviewers are as interested in your questions as they are in your answers. #Person1#: Any more hints as to what I should do in an interview? #Person2#: Always be honest with your answers. The interviewers really do want to know if you will be a good fit for them.', None, 50, False]
 
 
 
 
 
104
  ]
105
 
106
  # Define the Gradio interface
 
115
  ],
116
  outputs=gr.Textbox(label='Summarized Text'),
117
  title='Text or PDF Summarizer using T5-finetuned-dialogue_sumxx',
118
+ examples=examples_text
119
 
120
  )
121