ysharma HF staff commited on
Commit
3c2de58
ยท
1 Parent(s): ad3f786

Update tooltip

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -14,13 +14,12 @@ def get_data():
14
  df = df.sort_values(by=['Tweet Volume'], ascending=False)
15
  return df[["Trending Topic / Hashtag", "Tweet Volume"]][:15]
16
 
17
-
18
  with gr.Blocks() as demo:
19
- gr.Markdown("# ๐Ÿ“ˆ Real-Time Line Plot")
 
20
  with gr.Row():
21
- gr.LinePlot(get_data, x="Trending Topic / Hashtag", y="Tweet Volume", every=5, overlay_point=True, width=500, height=500)
22
- gr.ScatterPlot(get_data, y="Tweet Volume", x="Trending Topic / Hashtag", every=5, width=500, height=500)
23
  with gr.Row():
24
- #with gr.Column():
25
  gr.DataFrame(get_data, every=5)
26
  demo.queue().launch() # Run the demo with queuing enabled
 
14
  df = df.sort_values(by=['Tweet Volume'], ascending=False)
15
  return df[["Trending Topic / Hashtag", "Tweet Volume"]][:15]
16
 
 
17
  with gr.Blocks() as demo:
18
+ gr.Markdown("# ๐Ÿ“ˆ Twitter Trends - United States using Real-Time Line and Scatter Plot")
19
+ gr.Markdown("Following are the current top twitter trending topics in United States, Trends last updated every 30 minutes !")
20
  with gr.Row():
21
+ gr.LinePlot(get_data, x="Trending Topic / Hashtag", y="Tweet Volume", tooltip=["Trending Topic / Hashtag","Tweet Volume"] , every=5, overlay_point=True, width=500, height=500, title='Real-Time Line Plot')
22
+ gr.ScatterPlot(get_data, y="Tweet Volume", x="Trending Topic / Hashtag", tooltip=["Trending Topic / Hashtag","Tweet Volume"] , every=5, width=500, height=500, title='Real-Time Scatter Plot')
23
  with gr.Row():
 
24
  gr.DataFrame(get_data, every=5)
25
  demo.queue().launch() # Run the demo with queuing enabled