YangHao520 commited on
Commit
5831927
·
1 Parent(s): c1469f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -21,6 +21,7 @@ import os
21
  import tempfile
22
  import shutil
23
 
 
24
  def shortest_edit_path(s1, s2, dp):
25
  """计算两个字符串的最短编辑路径。 Args:
26
  s1 (str): 源字符串。 s2 (str): 目标字符串。 dp (list of list of int): 动态规划矩阵,表示从源字符串到目标字符串的编辑距离。 Returns:
@@ -582,6 +583,8 @@ def gradioDemo():
582
  gptApiKey = gr.Textbox(label='GPTAPIKey', lines=2, placeholder='输入apiKey')
583
 
584
  button2 = gr.Button('开始审核')
 
 
585
 
586
  with gr.Tab('GPT改写效果解析_文本'):
587
  text_input = gr.Textbox(label='文本A', lines=2, placeholder='输入改写前文本...')
@@ -594,6 +597,9 @@ def gradioDemo():
594
  gptApiKey = gr.Textbox(label='GPTAPIKey', lines=2, placeholder='输入apiKey...')
595
  outputText = gr.Textbox(label='AI审核结果', lines=2, placeholder='...')
596
  button3 = gr.Button('开始审核')
 
 
 
597
  gr.Markdown("注:使用GPT4需要有gpt4权限的apiKey")
598
  gr.Markdown("## 文本例子")
599
  gr.Examples(
@@ -606,9 +612,6 @@ def gradioDemo():
606
  )
607
 
608
 
609
- button2.click(excelAIReviewTag, inputs=[inputs,textGPTTargetinput1,drop,slider,gptApiKey], outputs=outputs)
610
- button3.click(AnalyzingSemanticChanges,inputs=[text_input,textGPTinput,drop,slider,gptApiKey],outputs=outputText)
611
-
612
 
613
 
614
  demo.queue(concurrency_count=20).launch()
 
21
  import tempfile
22
  import shutil
23
 
24
+
25
  def shortest_edit_path(s1, s2, dp):
26
  """计算两个字符串的最短编辑路径。 Args:
27
  s1 (str): 源字符串。 s2 (str): 目标字符串。 dp (list of list of int): 动态规划矩阵,表示从源字符串到目标字符串的编辑距离。 Returns:
 
583
  gptApiKey = gr.Textbox(label='GPTAPIKey', lines=2, placeholder='输入apiKey')
584
 
585
  button2 = gr.Button('开始审核')
586
+ button2.click(excelAIReviewTag, inputs=[inputs, textGPTTargetinput1, drop, slider, gptApiKey],
587
+ outputs=outputs)
588
 
589
  with gr.Tab('GPT改写效果解析_文本'):
590
  text_input = gr.Textbox(label='文本A', lines=2, placeholder='输入改写前文本...')
 
597
  gptApiKey = gr.Textbox(label='GPTAPIKey', lines=2, placeholder='输入apiKey...')
598
  outputText = gr.Textbox(label='AI审核结果', lines=2, placeholder='...')
599
  button3 = gr.Button('开始审核')
600
+ button3.click(AnalyzingSemanticChanges, inputs=[text_input, textGPTinput, drop, slider, gptApiKey],
601
+ outputs=outputText)
602
+
603
  gr.Markdown("注:使用GPT4需要有gpt4权限的apiKey")
604
  gr.Markdown("## 文本例子")
605
  gr.Examples(
 
612
  )
613
 
614
 
 
 
 
615
 
616
 
617
  demo.queue(concurrency_count=20).launch()