mattritchey commited on
Commit
2a74417
·
verified ·
1 Parent(s): fe6a323

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -2
main.py CHANGED
@@ -2,7 +2,7 @@ from fastapi import FastAPI
2
  import uvicorn
3
 
4
 
5
- import streamlit as st
6
  import pandas as pd
7
  import numpy as np
8
  import requests
@@ -24,6 +24,13 @@ app = FastAPI()
24
  def root():
25
  return {"API": "AdressScrap"}
26
 
 
 
 
 
 
 
 
27
  def jaccard_similarity(string1, string2,n = 2, normalize=True):
28
  try:
29
  if normalize:
@@ -99,7 +106,7 @@ def google_address(address):
99
 
100
 
101
 
102
- @app.get('/Hail_Docker_Data')
103
  async def predict(address: str):
104
  try:
105
  results= google_address(addresses)
 
2
  import uvicorn
3
 
4
 
5
+
6
  import pandas as pd
7
  import numpy as np
8
  import requests
 
24
  def root():
25
  return {"API": "AdressScrap"}
26
 
27
+ def normalize_string(string):
28
+ normalized_string = string.lower()
29
+ normalized_string = re.sub(r'[^\w\s]', '', normalized_string)
30
+
31
+ return normalized_string
32
+
33
+
34
  def jaccard_similarity(string1, string2,n = 2, normalize=True):
35
  try:
36
  if normalize:
 
106
 
107
 
108
 
109
+ @app.get('/AddressScrap)
110
  async def predict(address: str):
111
  try:
112
  results= google_address(addresses)