Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ from langchain_community.vectorstores import FAISS
|
|
| 10 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
| 11 |
|
| 12 |
|
|
|
|
| 13 |
api_key = os.getenv("OPENAI_API_KEY")
|
| 14 |
if not api_key:
|
| 15 |
print("โ OPENAI_API_KEY๊ฐ ์ค์ ๋์ง ์์์ต๋๋ค.")
|
|
@@ -17,41 +18,33 @@ else:
|
|
| 17 |
print("โ
OPENAI_API_KEY๊ฐ ์ค์ ๋์ด ์์ต๋๋ค.")
|
| 18 |
|
| 19 |
|
|
|
|
| 20 |
def get_country_folders():
|
| 21 |
exclude = [".git", ".cache", "__pycache__", ".ipynb_checkpoints"]
|
| 22 |
-
folders = [
|
| 23 |
-
f for f in os.listdir(".")
|
| 24 |
-
if os.path.isdir(f) and f not in exclude
|
| 25 |
-
]
|
| 26 |
return folders if folders else ["ํด๋ ์์"]
|
| 27 |
|
| 28 |
|
|
|
|
| 29 |
def preview_excel(excel_file):
|
| 30 |
if not excel_file:
|
| 31 |
return None
|
| 32 |
-
|
| 33 |
try:
|
| 34 |
-
|
| 35 |
-
return df
|
| 36 |
except Exception as e:
|
| 37 |
-
return pd.DataFrame({"์ค๋ฅ": [
|
| 38 |
|
| 39 |
|
|
|
|
| 40 |
def build_database(country_folder):
|
| 41 |
if country_folder == "ํด๋ ์์":
|
| 42 |
return None
|
| 43 |
|
| 44 |
all_texts = []
|
| 45 |
-
|
| 46 |
-
chunk_size=800,
|
| 47 |
-
chunk_overlap=100
|
| 48 |
-
)
|
| 49 |
|
| 50 |
path = f"./{country_folder}"
|
| 51 |
-
files = [
|
| 52 |
-
f for f in os.listdir(path)
|
| 53 |
-
if f.lower().endswith(".pdf")
|
| 54 |
-
]
|
| 55 |
|
| 56 |
if not files:
|
| 57 |
return None
|
|
@@ -62,14 +55,9 @@ def build_database(country_folder):
|
|
| 62 |
for page in pdf.pages:
|
| 63 |
text = page.extract_text()
|
| 64 |
if text:
|
| 65 |
-
|
| 66 |
-
f"[์ถ์ฒ: {filename}] {text}"
|
| 67 |
-
)
|
| 68 |
-
all_texts.extend(chunks)
|
| 69 |
-
|
| 70 |
except Exception as e:
|
| 71 |
-
print(f"PDF
|
| 72 |
-
continue
|
| 73 |
|
| 74 |
if not all_texts:
|
| 75 |
return None
|
|
@@ -78,219 +66,119 @@ def build_database(country_folder):
|
|
| 78 |
return FAISS.from_texts(all_texts, embeddings)
|
| 79 |
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
|
|
|
| 83 |
ws = wb.active
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
header_fill = PatternFill(start_color="D9EAF7", end_color="D9EAF7", fill_type="solid")
|
| 88 |
-
|
| 89 |
-
for cell in ws[1]:
|
| 90 |
-
cell.fill = header_fill
|
| 91 |
-
cell.font = Font(bold=True)
|
| 92 |
-
cell.alignment = Alignment(horizontal="center", vertical="center")
|
| 93 |
|
| 94 |
-
headers = [
|
| 95 |
์ ํฉ_col = headers.index("์ ํฉ ์ฌ๋ถ") + 1
|
| 96 |
๊ท์ _col = headers.index("๊ท์ ์ ๋") + 1
|
| 97 |
|
| 98 |
for row in range(2, ws.max_row + 1):
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
if "๋ถ์ ํฉ" in ์ ํฉ๊ฐ:
|
| 103 |
-
for col in range(1, ws.max_column + 1):
|
| 104 |
-
ws.cell(row=row, column=col).fill = red_fill
|
| 105 |
-
|
| 106 |
-
elif "ํ์ธ ํ์" in ์ ํฉ๊ฐ or ("์ ๋ณด ์์" not in ๊ท์ ๊ฐ and ๊ท์ ๊ฐ.strip()):
|
| 107 |
-
for col in range(1, ws.max_column + 1):
|
| 108 |
-
ws.cell(row=row, column=col).fill = yellow_fill
|
| 109 |
-
|
| 110 |
-
for col in ws.columns:
|
| 111 |
-
max_length = 0
|
| 112 |
-
col_letter = col[0].column_letter
|
| 113 |
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
wrap_text=True
|
| 118 |
-
)
|
| 119 |
-
if cell.value:
|
| 120 |
-
max_length = max(max_length, len(str(cell.value)))
|
| 121 |
|
| 122 |
-
|
|
|
|
|
|
|
| 123 |
|
| 124 |
-
|
| 125 |
-
wb.save(out_path)
|
| 126 |
|
| 127 |
|
|
|
|
| 128 |
def process_screening(country, excel_file):
|
| 129 |
if not excel_file:
|
| 130 |
-
return None, "โ ์์
|
| 131 |
-
|
| 132 |
-
if country == "ํด๋ ์์":
|
| 133 |
-
return None, "โ ๊ตญ๊ฐ ํด๋๋ฅผ ๋จผ์ ์์ฑํ๊ณ PDF๋ฅผ ๋ฃ์ด์ฃผ์ธ์."
|
| 134 |
-
|
| 135 |
-
try:
|
| 136 |
-
vector_db = build_database(country)
|
| 137 |
-
|
| 138 |
-
if not vector_db:
|
| 139 |
-
return None, f"โ {country} ํด๋ ๋ด์ ๋ถ์ํ PDF ํ์ผ์ด ์์ต๋๋ค."
|
| 140 |
-
|
| 141 |
-
llm = ChatOpenAI(
|
| 142 |
-
model="gpt-4o-mini",
|
| 143 |
-
temperature=0
|
| 144 |
-
)
|
| 145 |
-
|
| 146 |
-
df = pd.read_excel(excel_file.name)
|
| 147 |
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
|
| 152 |
-
|
| 153 |
-
ing_name = str(row.iloc[0]).strip()
|
| 154 |
|
| 155 |
-
|
| 156 |
-
์ ํฉ์ฌ๋ถ.append("ํ์ธ ํ์")
|
| 157 |
-
๋ถ์ ํฉ์ฌ์ .append("์ฑ๋ถ๋ช
์ด ๋น์ด ์์ต๋๋ค.")
|
| 158 |
-
๊ท์ ๊ฒฐ๊ณผ.append("์ฑ๋ถ๋ช
์์")
|
| 159 |
-
continue
|
| 160 |
|
| 161 |
-
|
| 162 |
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
context = "\n".join([d.page_content for d in docs])
|
| 166 |
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
[์ฑ๋ถ๋ช
]
|
| 173 |
-
{ing_name}
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
|
|
|
| 177 |
|
| 178 |
-
|
| 179 |
-
{
|
| 180 |
|
| 181 |
-
๋ฐ
|
| 182 |
|
| 183 |
์ ํฉ ์ฌ๋ถ:
|
| 184 |
๋ถ์ ํฉ ์ฌ์ :
|
| 185 |
๊ท์ ์ ๋:
|
| 186 |
|
| 187 |
-
|
| 188 |
-
- ๊ท์ ์๋ฌธ์ ๊ธ์ง ์ฑ๋ถ์ผ๋ก ๋ณด์ด๋ฉด ์ ํฉ ์ฌ๋ถ๋ '๋ถ์ ํฉ'
|
| 189 |
-
- ๊ท์ ์๋ฌธ์ ์ฌ์ฉ ํ๋๋ ์กฐ๊ฑด์ด ์๊ณ , ์์
์ ํจ๋ ์ ๋ณด๊ฐ ์์ด ๊ธฐ์ค ์ด๊ณผ๋ฉด '๋ถ์ ํฉ'
|
| 190 |
-
- ๊ท์ ์๋ฌธ์ ์ฌ์ฉ ํ๋๋ ์กฐ๊ฑด์ด ์๊ณ , ์์
์ ํจ๋ ์ ๋ณด๊ฐ ์์ด ๊ธฐ์ค ์ด๋ด๋ฉด '์ ํฉ'
|
| 191 |
-
- ๊ท์ ์๋ฌธ์ ์ฌ์ฉ ํ๋๋ ์กฐ๊ฑด์ด ์์ผ๋ ํจ๋ ์ ๋ณด๊ฐ ์๊ฑฐ๋ ๋น๊ต๊ฐ ์ด๋ ค์ฐ๋ฉด 'ํ์ธ ํ์'
|
| 192 |
-
- ๊ท์ ์๋ฌธ์ ๊ด๋ จ ๋ด์ฉ์ด ์์ผ๋ฉด ์ ํฉ ์ฌ๋ถ๋ '์ ๋ณด ์์'
|
| 193 |
-
- ๋ถ์ ํฉ ์ฌ์ ๋ ๋ถ์ ํฉ์ผ ๋๋ง ์์ฑํ๊ณ , ์๋๋ฉด '-' ์์ฑ
|
| 194 |
-
- ๊ท์ ์ ๋์๋ ๊ธ์ง ์ฌ๋ถ, ์ฌ์ฉ ํ๋, ์ฌ์ฉ ์กฐ๊ฑด์ ์งง๊ฒ ์์ฑ
|
| 195 |
"""
|
| 196 |
|
| 197 |
-
|
| 198 |
|
| 199 |
-
|
| 200 |
-
reason = ""
|
| 201 |
-
reg = ""
|
| 202 |
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
|
| 224 |
-
|
| 225 |
-
|
|
|
|
| 226 |
|
| 227 |
-
|
| 228 |
|
| 229 |
-
return df, out_path
|
| 230 |
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
gr.
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
refresh_btn = gr.Button(
|
| 247 |
-
"๐ ํด๋ ์๋ก๊ณ ์นจ",
|
| 248 |
-
variant="secondary",
|
| 249 |
-
scale=0
|
| 250 |
-
)
|
| 251 |
-
|
| 252 |
-
with gr.Row():
|
| 253 |
-
f_in = gr.File(
|
| 254 |
-
label="์ ์ฑ๋ถ ์์
์
๋ก๋ (.xlsx)",
|
| 255 |
-
file_types=[".xlsx"]
|
| 256 |
-
)
|
| 257 |
-
|
| 258 |
-
btn = gr.Button(
|
| 259 |
-
"๐ ๋ถ์ ์์",
|
| 260 |
-
variant="primary"
|
| 261 |
-
)
|
| 262 |
-
|
| 263 |
-
with gr.Row():
|
| 264 |
-
df_out = gr.Dataframe(
|
| 265 |
-
label="๊ฒฐ๊ณผ ๋ฏธ๋ฆฌ๋ณด๊ธฐ",
|
| 266 |
-
wrap=True,
|
| 267 |
-
interactive=False,
|
| 268 |
-
height=500
|
| 269 |
-
)
|
| 270 |
-
|
| 271 |
-
f_out = gr.File(
|
| 272 |
-
label="๊ฒฐ๊ณผ ํ์ผ ๋ค์ด๋ก๋"
|
| 273 |
-
)
|
| 274 |
-
|
| 275 |
-
refresh_btn.click(
|
| 276 |
-
fn=lambda: gr.update(
|
| 277 |
-
choices=get_country_folders(),
|
| 278 |
-
value=get_country_folders()[0]
|
| 279 |
-
),
|
| 280 |
-
outputs=country_select
|
| 281 |
-
)
|
| 282 |
-
|
| 283 |
-
f_in.change(
|
| 284 |
-
fn=preview_excel,
|
| 285 |
-
inputs=f_in,
|
| 286 |
-
outputs=df_out
|
| 287 |
-
)
|
| 288 |
-
|
| 289 |
-
btn.click(
|
| 290 |
-
process_screening,
|
| 291 |
-
inputs=[country_select, f_in],
|
| 292 |
-
outputs=[df_out, f_out]
|
| 293 |
-
)
|
| 294 |
|
| 295 |
|
| 296 |
demo.launch()
|
|
|
|
| 10 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
| 11 |
|
| 12 |
|
| 13 |
+
# API ํค ํ์ธ
|
| 14 |
api_key = os.getenv("OPENAI_API_KEY")
|
| 15 |
if not api_key:
|
| 16 |
print("โ OPENAI_API_KEY๊ฐ ์ค์ ๋์ง ์์์ต๋๋ค.")
|
|
|
|
| 18 |
print("โ
OPENAI_API_KEY๊ฐ ์ค์ ๋์ด ์์ต๋๋ค.")
|
| 19 |
|
| 20 |
|
| 21 |
+
# ๊ตญ๊ฐ ํด๋ ๊ฐ์ ธ์ค๊ธฐ
|
| 22 |
def get_country_folders():
|
| 23 |
exclude = [".git", ".cache", "__pycache__", ".ipynb_checkpoints"]
|
| 24 |
+
folders = [f for f in os.listdir(".") if os.path.isdir(f) and f not in exclude]
|
|
|
|
|
|
|
|
|
|
| 25 |
return folders if folders else ["ํด๋ ์์"]
|
| 26 |
|
| 27 |
|
| 28 |
+
# ์์
๋ฏธ๋ฆฌ๋ณด๊ธฐ
|
| 29 |
def preview_excel(excel_file):
|
| 30 |
if not excel_file:
|
| 31 |
return None
|
|
|
|
| 32 |
try:
|
| 33 |
+
return pd.read_excel(excel_file.name)
|
|
|
|
| 34 |
except Exception as e:
|
| 35 |
+
return pd.DataFrame({"์ค๋ฅ": [str(e)]})
|
| 36 |
|
| 37 |
|
| 38 |
+
# PDF โ ๋ฒกํฐDB
|
| 39 |
def build_database(country_folder):
|
| 40 |
if country_folder == "ํด๋ ์์":
|
| 41 |
return None
|
| 42 |
|
| 43 |
all_texts = []
|
| 44 |
+
splitter = RecursiveCharacterTextSplitter(chunk_size=800, chunk_overlap=100)
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
path = f"./{country_folder}"
|
| 47 |
+
files = [f for f in os.listdir(path) if f.lower().endswith(".pdf")]
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
if not files:
|
| 50 |
return None
|
|
|
|
| 55 |
for page in pdf.pages:
|
| 56 |
text = page.extract_text()
|
| 57 |
if text:
|
| 58 |
+
all_texts.extend(splitter.split_text(f"[์ถ์ฒ: {filename}] {text}"))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
except Exception as e:
|
| 60 |
+
print(f"PDF ์ค๋ฅ: {filename} / {e}")
|
|
|
|
| 61 |
|
| 62 |
if not all_texts:
|
| 63 |
return None
|
|
|
|
| 66 |
return FAISS.from_texts(all_texts, embeddings)
|
| 67 |
|
| 68 |
|
| 69 |
+
# ์์
์คํ์ผ
|
| 70 |
+
def style_excel(path):
|
| 71 |
+
wb = load_workbook(path)
|
| 72 |
ws = wb.active
|
| 73 |
|
| 74 |
+
red = PatternFill(start_color="FFC7CE", end_color="FFC7CE", fill_type="solid")
|
| 75 |
+
yellow = PatternFill(start_color="FFF2CC", end_color="FFF2CC", fill_type="solid")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
+
headers = [c.value for c in ws[1]]
|
| 78 |
์ ํฉ_col = headers.index("์ ํฉ ์ฌ๋ถ") + 1
|
| 79 |
๊ท์ _col = headers.index("๊ท์ ์ ๋") + 1
|
| 80 |
|
| 81 |
for row in range(2, ws.max_row + 1):
|
| 82 |
+
status = str(ws.cell(row, ์ ํฉ_col).value or "")
|
| 83 |
+
reg = str(ws.cell(row, ๊ท์ _col).value or "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
if "๋ถ์ ํฉ" in status:
|
| 86 |
+
for c in range(1, ws.max_column + 1):
|
| 87 |
+
ws.cell(row, c).fill = red
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
+
elif "ํ์ธ ํ์" in status or ("์ ๋ณด ์์" not in reg and reg.strip()):
|
| 90 |
+
for c in range(1, ws.max_column + 1):
|
| 91 |
+
ws.cell(row, c).fill = yellow
|
| 92 |
|
| 93 |
+
wb.save(path)
|
|
|
|
| 94 |
|
| 95 |
|
| 96 |
+
# ํต์ฌ ๋ถ์
|
| 97 |
def process_screening(country, excel_file):
|
| 98 |
if not excel_file:
|
| 99 |
+
return None, "โ ์์
์
๋ก๋ ํ์"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
+
vector_db = build_database(country)
|
| 102 |
+
if not vector_db:
|
| 103 |
+
return None, "โ PDF ์์"
|
| 104 |
|
| 105 |
+
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
|
|
|
|
| 106 |
|
| 107 |
+
df = pd.read_excel(excel_file.name)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
+
์ ํฉ์ฌ๋ถ, ๋ถ์ ํฉ์ฌ์ , ๊ท์ ๊ฒฐ๊ณผ = [], [], []
|
| 110 |
|
| 111 |
+
for _, row in df.iterrows():
|
| 112 |
+
ing = str(row.iloc[0]).strip()
|
|
|
|
| 113 |
|
| 114 |
+
if not ing:
|
| 115 |
+
์ ํฉ์ฌ๋ถ.append("ํ์ธ ํ์")
|
| 116 |
+
๋ถ์ ํฉ์ฌ์ .append("์ฑ๋ถ ์์")
|
| 117 |
+
๊ท์ ๊ฒฐ๊ณผ.append("์ ๋ณด ์์")
|
| 118 |
+
continue
|
|
|
|
|
|
|
| 119 |
|
| 120 |
+
try:
|
| 121 |
+
docs = vector_db.similarity_search(ing, k=3)
|
| 122 |
+
context = "\n".join([d.page_content for d in docs])
|
| 123 |
|
| 124 |
+
prompt = f"""
|
| 125 |
+
์ฑ๋ถ: {ing}
|
| 126 |
|
| 127 |
+
๊ท์ ๊ธฐ๋ฐ์ผ๋ก ์๋ ํ์์ผ๋ก ๋ต๋ณ
|
| 128 |
|
| 129 |
์ ํฉ ์ฌ๋ถ:
|
| 130 |
๋ถ์ ํฉ ์ฌ์ :
|
| 131 |
๊ท์ ์ ๋:
|
| 132 |
|
| 133 |
+
{context}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
"""
|
| 135 |
|
| 136 |
+
res = llm.invoke(prompt).content
|
| 137 |
|
| 138 |
+
s, r, g = "", "", ""
|
|
|
|
|
|
|
| 139 |
|
| 140 |
+
for line in res.splitlines():
|
| 141 |
+
if line.startswith("์ ํฉ ์ฌ๋ถ:"):
|
| 142 |
+
s = line.replace("์ ํฉ ์ฌ๋ถ:", "").strip()
|
| 143 |
+
elif line.startswith("๋ถ์ ํฉ ์ฌ์ :"):
|
| 144 |
+
r = line.replace("๋ถ์ ํฉ ์ฌ์ :", "").strip()
|
| 145 |
+
elif line.startswith("๊ท์ ์ ๋:"):
|
| 146 |
+
g = line.replace("๊ท์ ์ ๋:", "").strip()
|
| 147 |
|
| 148 |
+
์ ํฉ์ฌ๋ถ.append(s or "ํ์ธ ํ์")
|
| 149 |
+
๋ถ์ ํฉ์ฌ์ .append(r or "-")
|
| 150 |
+
๊ท์ ๊ฒฐ๊ณผ.append(g or "์ ๋ณด ์์")
|
| 151 |
|
| 152 |
+
except Exception as e:
|
| 153 |
+
์ ํฉ์ฌ๋ถ.append("ํ์ธ ํ์")
|
| 154 |
+
๋ถ์ ํฉ์ฌ์ .append(str(e))
|
| 155 |
+
๊ท์ ๊ฒฐ๊ณผ.append("์๋ฌ")
|
| 156 |
|
| 157 |
+
df["์ ํฉ ์ฌ๋ถ"] = ์ ํฉ์ฌ๋ถ
|
| 158 |
+
df["๋ถ์ ํฉ ์ฌ์ "] = ๏ฟฝ๏ฟฝ๏ฟฝ์ ํฉ์ฌ์
|
| 159 |
+
df["๊ท์ ์ ๋"] = ๊ท์ ๊ฒฐ๊ณผ
|
| 160 |
|
| 161 |
+
out = f"result_{country}.xlsx"
|
| 162 |
+
df.to_excel(out, index=False)
|
| 163 |
+
style_excel(out)
|
| 164 |
|
| 165 |
+
return df, out
|
| 166 |
|
|
|
|
| 167 |
|
| 168 |
+
# UI
|
| 169 |
+
with gr.Blocks() as demo:
|
| 170 |
+
gr.Markdown("# ๐งช Regulatory AI")
|
| 171 |
+
|
| 172 |
+
country = gr.Dropdown(choices=get_country_folders(), value=get_country_folders()[0])
|
| 173 |
+
file = gr.File()
|
| 174 |
+
|
| 175 |
+
btn = gr.Button("๋ถ์")
|
| 176 |
+
|
| 177 |
+
df_out = gr.Dataframe(label="๋ฏธ๋ฆฌ๋ณด๊ธฐ", wrap=True, interactive=False)
|
| 178 |
+
file_out = gr.File()
|
| 179 |
+
|
| 180 |
+
file.change(preview_excel, inputs=file, outputs=df_out)
|
| 181 |
+
btn.click(process_screening, inputs=[country, file], outputs=[df_out, file_out])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
|
| 183 |
|
| 184 |
demo.launch()
|