Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -22,7 +22,7 @@ app = FastAPI()
|
|
| 22 |
#Root endpoints
|
| 23 |
@app.get("/")
|
| 24 |
def root():
|
| 25 |
-
return {"API": "
|
| 26 |
|
| 27 |
def normalize_string(string):
|
| 28 |
normalized_string = string.lower()
|
|
@@ -106,14 +106,14 @@ def google_address(address):
|
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
-
@app.get('/
|
| 110 |
async def predict(address: str):
|
| 111 |
try:
|
| 112 |
-
results= google_address(
|
| 113 |
results=results[['Address Input', 'Address Output','Match Percent','Website','Square Footage', 'Beds', 'Baths', 'Year Built',
|
| 114 |
'Link','Google Search Result', 'Description' ]]
|
| 115 |
except:
|
| 116 |
-
results= pd.DataFrame({'Address Input':[
|
| 117 |
|
| 118 |
return results
|
| 119 |
|
|
|
|
| 22 |
#Root endpoints
|
| 23 |
@app.get("/")
|
| 24 |
def root():
|
| 25 |
+
return {"API": "Adress Scrap"}
|
| 26 |
|
| 27 |
def normalize_string(string):
|
| 28 |
normalized_string = string.lower()
|
|
|
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
+
@app.get('/Address_Scrap')
|
| 110 |
async def predict(address: str):
|
| 111 |
try:
|
| 112 |
+
results= google_address(address)
|
| 113 |
results=results[['Address Input', 'Address Output','Match Percent','Website','Square Footage', 'Beds', 'Baths', 'Year Built',
|
| 114 |
'Link','Google Search Result', 'Description' ]]
|
| 115 |
except:
|
| 116 |
+
results= pd.DataFrame({'Address Input':[address]})
|
| 117 |
|
| 118 |
return results
|
| 119 |
|