Upload 2 files
Browse files- app.py +5 -4
- requirements.txt +12 -0
app.py
CHANGED
@@ -6,7 +6,8 @@
|
|
6 |
|
7 |
import os
|
8 |
import jinja2
|
9 |
-
|
|
|
10 |
import random
|
11 |
import re
|
12 |
import sys
|
@@ -191,7 +192,7 @@ def resume(name,mobile,email,Gra_beg,Gra_end,Gra_sch,Gra_maj,underGra_beg,underG
|
|
191 |
|
192 |
# 生成html和pdf
|
193 |
|
194 |
-
|
195 |
body = f"""
|
196 |
|
197 |
<main role="main">
|
@@ -243,7 +244,7 @@ def resume(name,mobile,email,Gra_beg,Gra_end,Gra_sch,Gra_maj,underGra_beg,underG
|
|
243 |
"""
|
244 |
|
245 |
|
246 |
-
|
247 |
|
248 |
|
249 |
|
@@ -256,7 +257,7 @@ def resume(name,mobile,email,Gra_beg,Gra_end,Gra_sch,Gra_maj,underGra_beg,underG
|
|
256 |
|
257 |
|
258 |
|
259 |
-
# In[
|
260 |
|
261 |
|
262 |
# Json输入,Dropdown更新函数
|
|
|
6 |
|
7 |
import os
|
8 |
import jinja2
|
9 |
+
import openai
|
10 |
+
import pdfkit
|
11 |
import random
|
12 |
import re
|
13 |
import sys
|
|
|
192 |
|
193 |
# 生成html和pdf
|
194 |
|
195 |
+
pdfkit_options = {'encoding': 'UTF-8'}
|
196 |
body = f"""
|
197 |
|
198 |
<main role="main">
|
|
|
244 |
"""
|
245 |
|
246 |
|
247 |
+
pdfkit.from_string(body, 'out.pdf',options=pdfkit_options) #with --page-size=Legal and --orientation=Landscape
|
248 |
|
249 |
|
250 |
|
|
|
257 |
|
258 |
|
259 |
|
260 |
+
# In[5]:
|
261 |
|
262 |
|
263 |
# Json输入,Dropdown更新函数
|
requirements.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jinja2
|
2 |
+
openai
|
3 |
+
pdfkit
|
4 |
+
random
|
5 |
+
re
|
6 |
+
sys
|
7 |
+
numpy
|
8 |
+
zipfile
|
9 |
+
langchain
|
10 |
+
pydantic
|
11 |
+
typing
|
12 |
+
datetime
|