Update select_question.py
Browse files- select_question.py +6 -1
select_question.py
CHANGED
@@ -3,7 +3,7 @@ import pandas as pd
|
|
3 |
import re
|
4 |
import tempfile
|
5 |
import os
|
6 |
-
|
7 |
|
8 |
# γγγ³γγγδ½ζ
|
9 |
def make_prompt(df):
|
@@ -66,6 +66,11 @@ def create_choice_question(csv_file):
|
|
66 |
result_df["ει‘2"] = result_df["γγγ³γγ2"].apply(get_chatgpt_response)
|
67 |
|
68 |
# 翻訳γγ
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
# csvγζΈγεΊγ
|
71 |
with tempfile.NamedTemporaryFile(delete=False, suffix='.csv') as tmp:
|
|
|
3 |
import re
|
4 |
import tempfile
|
5 |
import os
|
6 |
+
from translate import translate_text
|
7 |
|
8 |
# γγγ³γγγδ½ζ
|
9 |
def make_prompt(df):
|
|
|
66 |
result_df["ει‘2"] = result_df["γγγ³γγ2"].apply(get_chatgpt_response)
|
67 |
|
68 |
# 翻訳γγ
|
69 |
+
result_df["翻訳_ει‘1"] = result_df["ει‘1"].apply(translate_text)
|
70 |
+
result_df["翻訳_ει‘2"] = result_df["ει‘2"].apply(translate_text)
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
|
75 |
# csvγζΈγεΊγ
|
76 |
with tempfile.NamedTemporaryFile(delete=False, suffix='.csv') as tmp:
|