pknayak commited on
Commit
76e8a43
1 Parent(s): 8167a01

Changing the App structures

Browse files

Adding the markdown for explanation of the app

Files changed (1) hide show
  1. app.py +23 -14
app.py CHANGED
@@ -316,20 +316,29 @@ def sentiment_analyzer(csv_file_name='combined_news_response.csv'):
316
  # Creating the app for both
317
 
318
  with gr.Blocks() as demo:
319
- with gr.Row():
320
- with gr.Column(scale=1, min_width=600):
321
- ui_domain = gr.Dropdown(["bbc", "forbes", "businessinsider_us"], label="Select Domain")
322
- df_output = gr.Dataframe(type="pandas",wrap=True)
323
- retrieve_button = gr.Button("Retrieve news")
 
 
324
 
325
- retrieve_button.click(call_functions, inputs=ui_domain, outputs=df_output)
326
-
327
- with gr.Row():
328
- with gr.Column(scale=1, min_width=600):
329
- ui_input = gr.Textbox(value='combined_news_response.csv' , visible=False)
330
- view_sentiment_bttn = gr.Button("Analyze Sentiment")
331
- df_output = gr.Dataframe(type="pandas",wrap=True)
332
-
333
- view_sentiment_bttn.click(sentiment_analyzer, inputs=ui_input, outputs=df_output)
 
 
 
 
 
 
 
334
 
335
  demo.launch(debug=True)
 
316
  # Creating the app for both
317
 
318
  with gr.Blocks() as demo:
319
+ gr.Markdown("# Welcome to News Retrieval and Sentiment Analyzer App a.k.a InfoMood Tracker")
320
+ gr.Markdown("## Best tracker for your News around the globe ! ")
321
+ with gr.Accordion("Steps to run the App"):
322
+ gr.Markdown("1. Select the Domain from which you want to retrieve the news")
323
+ gr.Markdown("2. Click on the `Retrieve news` to retrieve the news from the domain. You Should see that the result displayed in the form of Table")
324
+ gr.Markdown("3. Click on the `Analyze Sentiment` to analyze the sentiments of the news retrieved.")
325
+ # gr.Markdown("4. ")
326
 
327
+ with gr.Row():
328
+ with gr.Column(scale=1, min_width=600):
329
+ ui_domain = gr.Dropdown(["bbc", "forbes", "businessinsider_us"], label="Select Domain")
330
+ retrieve_button = gr.Button("Retrieve news")
331
+ df_output = gr.Dataframe(type="pandas",wrap=True,label="News retrieved from the selected domain")
332
+
333
+ retrieve_button.click(call_functions, inputs=ui_domain, outputs=df_output)
334
+
335
+ with gr.Row():
336
+ with gr.Column(scale=1, min_width=600):
337
+ ui_input = gr.Textbox(value='combined_news_response.csv' , visible=False)
338
+ view_sentiment_bttn = gr.Button("Analyze Sentiment")
339
+ df_output = gr.Dataframe(type="pandas",wrap=True, label="News along with Sentiment")
340
+
341
+ view_sentiment_bttn.click(sentiment_analyzer, inputs=ui_input, outputs=df_output)
342
+
343
 
344
  demo.launch(debug=True)