Spaces:
Sleeping
Sleeping
home changes
Browse files- backend/api/main.py +3 -3
- backend/modules/home_page.py +3 -3
backend/api/main.py
CHANGED
|
@@ -13,9 +13,9 @@ df = home_page.process_data()
|
|
| 13 |
def home():
|
| 14 |
return home_page.home()
|
| 15 |
|
| 16 |
-
@app.get("/
|
| 17 |
-
def
|
| 18 |
-
continent = home_page.
|
| 19 |
return continent.tolist()
|
| 20 |
|
| 21 |
@app.get("/countries")
|
|
|
|
| 13 |
def home():
|
| 14 |
return home_page.home()
|
| 15 |
|
| 16 |
+
@app.get("/Continent")
|
| 17 |
+
def display_continents():
|
| 18 |
+
continent = home_page. continents(df)
|
| 19 |
return continent.tolist()
|
| 20 |
|
| 21 |
@app.get("/countries")
|
backend/modules/home_page.py
CHANGED
|
@@ -8,9 +8,9 @@ def process_data():
|
|
| 8 |
df = pd.read_csv(file_path)
|
| 9 |
return df
|
| 10 |
|
| 11 |
-
def
|
| 12 |
-
|
| 13 |
-
return
|
| 14 |
|
| 15 |
def country(df):
|
| 16 |
countries=df["Country"].values()
|
|
|
|
| 8 |
df = pd.read_csv(file_path)
|
| 9 |
return df
|
| 10 |
|
| 11 |
+
def continent(df):
|
| 12 |
+
continents=df["Continent"].unique()
|
| 13 |
+
return continents
|
| 14 |
|
| 15 |
def country(df):
|
| 16 |
countries=df["Country"].values()
|