Yunus Serhat Bıçakçı commited on
Commit
6d3814a
·
1 Parent(s): ff78739
Files changed (1) hide show
  1. pages/3_😡_Hate_Tweets.py +4 -0
pages/3_😡_Hate_Tweets.py CHANGED
@@ -45,6 +45,8 @@ tweets = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/multiclas
45
  borough = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/londonborough.geojson'
46
 
47
  map_option = st.selectbox('Choose a Map', ('Model 1', 'Model 2'))
 
 
48
 
49
  if map_option == 'Model 1':
50
  m.add_geojson(borough, layer_name='London Boroughs')
@@ -53,6 +55,7 @@ if map_option == 'Model 1':
53
  x="Longitude",
54
  y="Latitude",
55
  color_column='Hate Prediction',
 
56
  spin=True,
57
  add_legend=True
58
  )
@@ -63,6 +66,7 @@ else:
63
  x="Longitude",
64
  y="Latitude",
65
  color_column='Hate Prediction',
 
66
  spin=True,
67
  add_legend=True
68
  )
 
45
  borough = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/londonborough.geojson'
46
 
47
  map_option = st.selectbox('Choose a Map', ('Model 1', 'Model 2'))
48
+ palette_model_1 = ["red", "blue", "green", "yellow", "purple", "orange"]
49
+ palette_model_2 = ["red", "blue", "green", "yellow", "purple"]
50
 
51
  if map_option == 'Model 1':
52
  m.add_geojson(borough, layer_name='London Boroughs')
 
55
  x="Longitude",
56
  y="Latitude",
57
  color_column='Hate Prediction',
58
+ palette=palette_model_1,
59
  spin=True,
60
  add_legend=True
61
  )
 
66
  x="Longitude",
67
  y="Latitude",
68
  color_column='Hate Prediction',
69
+ palette=palette_model_2,
70
  spin=True,
71
  add_legend=True
72
  )