Yoon-gu Hwang
commited on
Commit
โข
19cad62
1
Parent(s):
81ae7dd
no pdf
Browse files- app.py +1 -3
- requirements.txt +1 -2
app.py
CHANGED
@@ -6,7 +6,6 @@ from docx.oxml.ns import qn
|
|
6 |
from docx import Document
|
7 |
from docx.shared import Inches, Pt, Cm, Mm, RGBColor
|
8 |
from docx.enum.table import WD_TABLE_ALIGNMENT
|
9 |
-
from docx2pdf import convert
|
10 |
import pandas as pd
|
11 |
|
12 |
with open('pokemon.json', 'r') as f:
|
@@ -96,8 +95,7 @@ def write_docx(gen):
|
|
96 |
|
97 |
if filename not in os.listdir():
|
98 |
document.save(filename)
|
99 |
-
|
100 |
-
return df, filename.replace('docx', 'pdf')
|
101 |
|
102 |
demo = gr.Interface(write_docx, generation, [text, download], title="๋์น๋ ํฌ์ผ๋ชฌ ๋๊ฐ ์์ฑ๊ธฐ",
|
103 |
description="์ํ๋ ํฌ์ผ๋ชฌ ์ธ๋๋ฅผ ์ ํํ๊ณ , ๋ค์ด๋ก๋๋ฅผ ๋๋ฌ์ฃผ์ธ์.")
|
|
|
6 |
from docx import Document
|
7 |
from docx.shared import Inches, Pt, Cm, Mm, RGBColor
|
8 |
from docx.enum.table import WD_TABLE_ALIGNMENT
|
|
|
9 |
import pandas as pd
|
10 |
|
11 |
with open('pokemon.json', 'r') as f:
|
|
|
95 |
|
96 |
if filename not in os.listdir():
|
97 |
document.save(filename)
|
98 |
+
return df, filename
|
|
|
99 |
|
100 |
demo = gr.Interface(write_docx, generation, [text, download], title="๋์น๋ ํฌ์ผ๋ชฌ ๋๊ฐ ์์ฑ๊ธฐ",
|
101 |
description="์ํ๋ ํฌ์ผ๋ชฌ ์ธ๋๋ฅผ ์ ํํ๊ณ , ๋ค์ด๋ก๋๋ฅผ ๋๋ฌ์ฃผ์ธ์.")
|
requirements.txt
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
gradio
|
2 |
python-docx
|
3 |
-
pandas
|
4 |
-
docx2pdf
|
|
|
1 |
gradio
|
2 |
python-docx
|
3 |
+
pandas
|
|