fantos commited on
Commit
d5eb308
·
verified ·
1 Parent(s): b0053e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,3 @@
1
- # app.py
2
-
3
  import gradio as gr
4
  from utils import WatermarkProcessor
5
  import json
@@ -95,6 +93,7 @@ class WatermarkGUI:
95
  os.remove(temp_path)
96
 
97
  try:
 
98
  data = json.loads(result)
99
  report = f"""
100
  ### Extracted Watermark
@@ -108,6 +107,7 @@ Text: {data.get('text', 'N/A')}
108
  return report
109
  except Exception as e:
110
  logging.error("워터마크 디코딩 결과 파싱 오류: %s", e)
 
111
  return result
112
 
113
  def create_interface(self):
 
 
 
1
  import gradio as gr
2
  from utils import WatermarkProcessor
3
  import json
 
93
  os.remove(temp_path)
94
 
95
  try:
96
+ # JSON 파싱 시도
97
  data = json.loads(result)
98
  report = f"""
99
  ### Extracted Watermark
 
107
  return report
108
  except Exception as e:
109
  logging.error("워터마크 디코딩 결과 파싱 오류: %s", e)
110
+ # JSON 파싱 실패 시, 원본 결과 반환
111
  return result
112
 
113
  def create_interface(self):