weiwei1392 commited on
Commit
b32d625
·
1 Parent(s): a5ab0b5

修正生成prompt错误

Browse files
Files changed (2) hide show
  1. app.py +0 -3
  2. mock_data.py +1 -2
app.py CHANGED
@@ -1,7 +1,4 @@
1
- import json
2
-
3
  import gradio as gr
4
- import pandas as pd
5
  from llm import OpenAI3, OpenAI4
6
  from mock_data import *
7
 
 
 
 
1
  import gradio as gr
 
2
  from llm import OpenAI3, OpenAI4
3
  from mock_data import *
4
 
mock_data.py CHANGED
@@ -1,7 +1,6 @@
1
  import random
2
  import math
3
  import pandas as pd
4
- import gradio as gr
5
  import numpy as np
6
  from typing import List
7
  from llm import OpenAI3
@@ -77,7 +76,7 @@ def medium_score_rewrite(standard_file, rewrite_prompt, topic, assessments):
77
  content = df[df['得分'] == score][index].to_string(index=False)
78
  stand_comment.append(content)
79
 
80
- s_comment = ';'.join(stand_comment)
81
  prompt = 'f"""' + rewrite_prompt + '"""'
82
  r_comment = llm(eval(prompt))
83
  return r_comment
 
1
  import random
2
  import math
3
  import pandas as pd
 
4
  import numpy as np
5
  from typing import List
6
  from llm import OpenAI3
 
76
  content = df[df['得分'] == score][index].to_string(index=False)
77
  stand_comment.append(content)
78
 
79
+ stand_comment = ';'.join(stand_comment)
80
  prompt = 'f"""' + rewrite_prompt + '"""'
81
  r_comment = llm(eval(prompt))
82
  return r_comment