FDSRashid commited on
Commit
54dac96
·
1 Parent(s): ffaaf4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -24,14 +24,14 @@ def get_narrators( city , year ):
24
  try:
25
  df = subset_city_year(city, year)
26
  narrators = edge_info[edge_info['Edge_ID'].isin(df['ID'])]
27
- return narrators['Edge_Name'].reset_index().rename(columns = {'Edge_Name': 'Teacher To Student'})
28
  except Exception as e:
29
  return str(e)
30
 
 
31
  with gr.Blocks() as demo:
32
  Places = gr.Dropdown(choices = cities, value = ['المدينه', 'بغداد', 'كوفة', 'بصرة'], multiselect=True, label = 'Location')
33
- Last_Year = gr.Slider(min_year, max_year, value = 400, label = 'End', info = 'Choose the year to display Narrators')
34
  btn = gr.Button('Submit')
35
  btn.click(fn = get_narrators, inputs = [Places, Last_Year], outputs = gr.DataFrame())
36
  demo.launch()
37
-
 
24
  try:
25
  df = subset_city_year(city, year)
26
  narrators = edge_info[edge_info['Edge_ID'].isin(df['ID'])]
27
+ return narrators['Edge_Name'].reset_index().drop('index', axis = 1).rename(columns = {'Edge_Name': 'Teacher To Student'})
28
  except Exception as e:
29
  return str(e)
30
 
31
+
32
  with gr.Blocks() as demo:
33
  Places = gr.Dropdown(choices = cities, value = ['المدينه', 'بغداد', 'كوفة', 'بصرة'], multiselect=True, label = 'Location')
34
+ Last_Year = gr.Slider(min_year, max_year, value = 50, label = 'End', info = 'Choose the year to display Narrators')
35
  btn = gr.Button('Submit')
36
  btn.click(fn = get_narrators, inputs = [Places, Last_Year], outputs = gr.DataFrame())
37
  demo.launch()