FahadAlam commited on
Commit
2a562b6
1 Parent(s): 857289a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -32,22 +32,23 @@ def wikipediaScrap(article_name, wikipedia_language = "en"):
32
 
33
  with gr.Blocks( css = "footer {visibility: hidden} #dsd_button {background: purple, color: white}" ) as demo:
34
  with gr.Row():
35
- inp = gr.Textbox(placeholder="Enter the name of wikipedia article")
36
- lan = gr.Textbox(placeholder="Enter the language code")
37
  btn = gr.Button("Start Scraping", elem_id="dsd_button")
38
- gr.Markdown("""### Wordcloud""")
39
  with gr.Row():
40
  with gr.Column():
41
- title = gr.Textbox()
42
- url = gr.Textbox()
 
43
  with gr.Column():
 
44
  wordcloud = gr.Plot()
45
  gr.Markdown("""### Content""")
46
  with gr.Row():
47
- content = gr.Textbox()
48
  gr.Markdown("""### Linked Articles""")
49
  with gr.Row():
50
- linked = gr.Textbox()
51
  with gr.Row():
52
  gr.Examples(
53
  examples = [["Eiffel Tower", "en"], ["Eiffel tower", 'ur']], fn=wikipediaScrap, inputs=[inp, lan], outputs=[title, content, url, linked, wordcloud], cache_examples=True)
 
32
 
33
  with gr.Blocks( css = "footer {visibility: hidden} #dsd_button {background: purple, color: white}" ) as demo:
34
  with gr.Row():
35
+ inp = gr.Textbox(placeholder="Enter the name of wikipedia article", label="Wikipedia article name")
36
+ lan = gr.Textbox(placeholder="Enter the language code", label="Language")
37
  btn = gr.Button("Start Scraping", elem_id="dsd_button")
 
38
  with gr.Row():
39
  with gr.Column():
40
+ gr.Markdown("""## About""")
41
+ title = gr.Textbox(label="Article title")
42
+ url = gr.Textbox(label="Article URL")
43
  with gr.Column():
44
+ gr.Markdown("""## Wordcloud""")
45
  wordcloud = gr.Plot()
46
  gr.Markdown("""### Content""")
47
  with gr.Row():
48
+ content = gr.Textbox(label="Content")
49
  gr.Markdown("""### Linked Articles""")
50
  with gr.Row():
51
+ linked = gr.Textbox(label="Linked Articles")
52
  with gr.Row():
53
  gr.Examples(
54
  examples = [["Eiffel Tower", "en"], ["Eiffel tower", 'ur']], fn=wikipediaScrap, inputs=[inp, lan], outputs=[title, content, url, linked, wordcloud], cache_examples=True)