Skip to content

Commit fe8c880

Browse files
committed
fix: create app 함수 Main 밖으로 뺌
1 parent f2cc3f3 commit fe8c880

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

core/tariff_prediction/tools/get_exchange_rate_info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_exchange_rate_api(cur_unit: str, situation: str = '해외직구'):
2929

3030
try:
3131
response = requests.get(KOREAEXIM_API_URL, params=params)
32-
response.raise_for_status()
32+
response.raise_for_status()
3333
data = pd.DataFrame(response.json())
3434

3535
filtered_data = data[data['cur_unit'] == cur_unit]
@@ -48,6 +48,7 @@ def get_exchange_rate_api(cur_unit: str, situation: str = '해외직구'):
4848

4949
return usd_rate
5050
except Exception as e:
51+
print("환율 api 오류: ",e)
5152
return None # 오류 시 None 반환
5253

5354
@tool

run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from dotenv import load_dotenv
22
load_dotenv()
33
from app import create_app
4+
app = create_app()
45

56
if __name__ == "__main__":
6-
app = create_app()
77
app.run(host="0.0.0.0", port=5050)

0 commit comments

Comments
 (0)