pavithra-devi commited on
Commit
8dbd490
1 Parent(s): 029ea88

added the app,py

Browse files
Files changed (1) hide show
  1. app.py +11 -22
app.py CHANGED
@@ -23,29 +23,18 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
23
  with gr.Row():
24
  gr.Markdown("Type in your document which you wanna summarize...")
25
 
26
- with gr.Row():
27
- with gr.Column():
28
- input_text_box = gr.Textbox(
29
- label="Document",
30
- info="Example text",
31
- lines=20,
32
- value="Wikipedia is a free, open content online encyclopedia created through the collaborative effort of a community of users known as Wikipedians. Anyone registered on the site can create an article for publication; registration is not required to edit articles.",
33
- )
34
- with gr.Column():
35
- output_text_box = gr.Label("summary")
36
-
37
- input_interfaces.append(input_text_box)
38
-
39
-
40
-
41
- # with gr.Row():
42
- # predict_but = gr.Button("Predict")
43
 
 
44
 
45
  # Add the button actions.
46
- gr.Interface(predict,
47
- inputs=input_interfaces,
48
- outputs=output_text_box)
49
- # predict_but.click(predict, inputs=input_interfaces, outputs=output_text_box)
50
 
51
- app.launch()
 
23
  with gr.Row():
24
  gr.Markdown("Type in your document which you wanna summarize...")
25
 
26
+ input_text_box = gr.Textbox(
27
+ label="Document",
28
+ info="Example text",
29
+ lines=20,
30
+ value="Wikipedia is a free, open content online encyclopedia created through the collaborative effort of a community of users known as Wikipedians. Anyone registered on the site can create an article for publication; registration is not required to edit articles. Jimmy Wales and Larry Sanger co-founded Wikipedia as an offshoot of an earlier encyclopedia project, Nupedia, in January 2001. Originally, Wikipedia was created to provide content for Nupedia. However, as the wiki site became established it soon grew beyond the scope of the earlier project. As of January 2015, the website provided well over five million articles in English and more than that number in all other languages combined. At that same time, Alexa ranked Wikipedia as the seventh-most popular site on the Internet. Wikipedia was the only non-commercial site of the top ten.",
31
+ )
 
 
 
 
 
 
 
 
 
 
 
32
 
33
+ input_interfaces.append(input_text_box)
34
 
35
  # Add the button actions.
36
+ gr.Interface(predict,
37
+ inputs=input_interfaces,
38
+ outputs="text")
 
39
 
40
+ app.launch(share=True)