Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ cities = taraf_info['City'].unique().tolist()
|
|
14 |
min_year = int(taraf_info['Year'].min())
|
15 |
max_year = int(taraf_info['Year'].max())
|
16 |
|
17 |
-
def subset_city_year(city,
|
18 |
-
edges = taraf_info[(taraf_info['Year']
|
19 |
return edges
|
20 |
|
21 |
def subset_year(year = 50):
|
@@ -44,7 +44,8 @@ def get_narrators( city , year):
|
|
44 |
|
45 |
with gr.Blocks() as demo:
|
46 |
Places = gr.Dropdown(choices = cities, value = ['المدينه', 'بغداد', 'كوفة', 'بصرة'], multiselect=True, label = 'Location')
|
47 |
-
|
|
|
48 |
btn = gr.Button('Submit')
|
49 |
-
btn.click(fn = get_narrators, inputs = [Places, Last_Year], outputs = gr.DataFrame())
|
50 |
demo.launch()
|
|
|
14 |
min_year = int(taraf_info['Year'].min())
|
15 |
max_year = int(taraf_info['Year'].max())
|
16 |
|
17 |
+
def subset_city_year(city, year1, year2):
|
18 |
+
edges = taraf_info[(taraf_info['Year'] >= year1) & (taraf_info['City'].isin(city)) & (taraf_info['Year'] <= year2)]
|
19 |
return edges
|
20 |
|
21 |
def subset_year(year = 50):
|
|
|
44 |
|
45 |
with gr.Blocks() as demo:
|
46 |
Places = gr.Dropdown(choices = cities, value = ['المدينه', 'بغداد', 'كوفة', 'بصرة'], multiselect=True, label = 'Location')
|
47 |
+
First_Year = gr.Slider(min_year, max_year, value = 10, label = 'Begining', info = 'Choose the first year to display Narrators')
|
48 |
+
Last_Year = gr.Slider(min_year, max_year, value = 50, label = 'End', info = 'Choose the Last year to display Narrators')
|
49 |
btn = gr.Button('Submit')
|
50 |
+
btn.click(fn = get_narrators, inputs = [Places, First_Year, Last_Year], outputs = gr.DataFrame())
|
51 |
demo.launch()
|