Spaces:
openfree
/
Running on CPU Upgrade

ginipick commited on
Commit
e078df1
·
verified ·
1 Parent(s): 585cf28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -9,6 +9,7 @@ from requests.adapters import HTTPAdapter
9
  from requests.packages.urllib3.util.retry import Retry
10
  from openai import OpenAI
11
  from bs4 import BeautifulSoup
 
12
 
13
  ACCESS_TOKEN = os.getenv("HF_TOKEN")
14
  if not ACCESS_TOKEN:
@@ -951,6 +952,7 @@ def get_article_content(url):
951
  return full_content.strip()
952
 
953
  except Exception as e:
 
954
  return f"Error crawling content: {str(e)}"
955
 
956
  def respond(url, history, system_message, max_tokens, temperature, top_p):
 
9
  from requests.packages.urllib3.util.retry import Retry
10
  from openai import OpenAI
11
  from bs4 import BeautifulSoup
12
+ import re # re 모듈 추가
13
 
14
  ACCESS_TOKEN = os.getenv("HF_TOKEN")
15
  if not ACCESS_TOKEN:
 
952
  return full_content.strip()
953
 
954
  except Exception as e:
955
+ print(f"Crawling error details: {str(e)}") # 디버깅을 위한 상세 에러 출력
956
  return f"Error crawling content: {str(e)}"
957
 
958
  def respond(url, history, system_message, max_tokens, temperature, top_p):