Yoon-gu Hwang commited on
Commit
19cad62
โ€ข
1 Parent(s): 81ae7dd
Files changed (2) hide show
  1. app.py +1 -3
  2. 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
- convert(filename)
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