Update app.py
Browse files
app.py
CHANGED
@@ -1796,10 +1796,6 @@ def create_interface():
|
|
1796 |
return app
|
1797 |
|
1798 |
|
1799 |
-
# Flask 앱 초기화
|
1800 |
-
load_dotenv()
|
1801 |
-
app = Flask(__name__)
|
1802 |
-
|
1803 |
# Flask 라우트
|
1804 |
@app.route('/static/<path:path>')
|
1805 |
def serve_static(path):
|
@@ -1826,9 +1822,6 @@ os.makedirs('assets', exist_ok=True)
|
|
1826 |
if __name__ == "__main__":
|
1827 |
# 환경변수 로드
|
1828 |
load_dotenv()
|
1829 |
-
|
1830 |
-
# 필요한 디렉토리들 생성
|
1831 |
-
required_dirs = [
|
1832 |
'static',
|
1833 |
'assets',
|
1834 |
'data',
|
@@ -1870,4 +1863,39 @@ if __name__ == "__main__":
|
|
1870 |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
1871 |
<meta name="apple-mobile-web-app-title" content="디지털 굿판">
|
1872 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1873 |
)
|
|
|
1796 |
return app
|
1797 |
|
1798 |
|
|
|
|
|
|
|
|
|
1799 |
# Flask 라우트
|
1800 |
@app.route('/static/<path:path>')
|
1801 |
def serve_static(path):
|
|
|
1822 |
if __name__ == "__main__":
|
1823 |
# 환경변수 로드
|
1824 |
load_dotenv()
|
|
|
|
|
|
|
1825 |
'static',
|
1826 |
'assets',
|
1827 |
'data',
|
|
|
1863 |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
1864 |
<meta name="apple-mobile-web-app-title" content="디지털 굿판">
|
1865 |
"""
|
1866 |
+
)
|
1867 |
+
custom_html = """
|
1868 |
+
<!DOCTYPE html>
|
1869 |
+
<html lang="ko">
|
1870 |
+
<head>
|
1871 |
+
<meta charset="utf-8">
|
1872 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
1873 |
+
<title>디지털 굿판</title>
|
1874 |
+
<link rel="manifest" href="/static/manifest.json">
|
1875 |
+
<meta name="theme-color" content="#0b0f19">
|
1876 |
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
1877 |
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
1878 |
+
<meta name="apple-mobile-web-app-title" content="디지털 굿판">
|
1879 |
+
{%css%}
|
1880 |
+
</head>
|
1881 |
+
<body>
|
1882 |
+
<div id="gradio-app">
|
1883 |
+
{%body%}
|
1884 |
+
</div>
|
1885 |
+
{%scripts%}
|
1886 |
+
</body>
|
1887 |
+
</html>
|
1888 |
+
"""
|
1889 |
+
|
1890 |
+
# Gradio 앱 실행
|
1891 |
+
demo.queue().launch(
|
1892 |
+
server_name="0.0.0.0",
|
1893 |
+
server_port=7860,
|
1894 |
+
share=True,
|
1895 |
+
debug=True,
|
1896 |
+
show_error=True,
|
1897 |
+
height=None,
|
1898 |
+
width="100%",
|
1899 |
+
favicon_path="static/icons/icon-72x72.png",
|
1900 |
+
custom_html=custom_html
|
1901 |
)
|