shohabbosdev commited on
Commit
d420eb2
1 Parent(s): 73f2dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,14 +2,14 @@ import gradio as gr
2
  import json
3
 
4
  def regions_list():
5
- with open('regions-districts-json-master/regions.json', 'r') as f:
6
  regions = json.load(f)
7
  reg_name = [(i['name_uz'], i['id']) for i in regions]
8
  reg_tuple = [tuple(reg_name[k]) for k in range(len(reg_name))]
9
  return reg_tuple
10
 
11
  def district_list():
12
- with open('regions-districts-json-master/districts.json', 'r') as f:
13
  districts = json.load(f)
14
  dis_name = [(i['name_uz'], i['region_id']) for i in districts]
15
  dis_tuple = [tuple(dis_name[k]) for k in range(len(dis_name))]
 
2
  import json
3
 
4
  def regions_list():
5
+ with open('regions.json', 'r') as f:
6
  regions = json.load(f)
7
  reg_name = [(i['name_uz'], i['id']) for i in regions]
8
  reg_tuple = [tuple(reg_name[k]) for k in range(len(reg_name))]
9
  return reg_tuple
10
 
11
  def district_list():
12
+ with open('districts.json', 'r') as f:
13
  districts = json.load(f)
14
  dis_name = [(i['name_uz'], i['region_id']) for i in districts]
15
  dis_tuple = [tuple(dis_name[k]) for k in range(len(dis_name))]