Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,6 @@ from typing import Optional
|
|
5 |
from fastapi.encoders import jsonable_encoder
|
6 |
from bs4 import BeautifulSoup
|
7 |
import requests
|
8 |
-
from functools import lru_cache
|
9 |
import urllib.parse
|
10 |
|
11 |
app = FastAPI()
|
@@ -124,8 +123,6 @@ async def chat(
|
|
124 |
except Exception as e:
|
125 |
raise HTTPException(status_code=500, detail=f"Error getting chat results: {e}")
|
126 |
|
127 |
-
|
128 |
-
@lru_cache(maxsize=128)
|
129 |
def extract_text_from_webpage(html_content):
|
130 |
"""Extracts visible text from HTML content using BeautifulSoup."""
|
131 |
soup = BeautifulSoup(html_content, "html.parser")
|
|
|
5 |
from fastapi.encoders import jsonable_encoder
|
6 |
from bs4 import BeautifulSoup
|
7 |
import requests
|
|
|
8 |
import urllib.parse
|
9 |
|
10 |
app = FastAPI()
|
|
|
123 |
except Exception as e:
|
124 |
raise HTTPException(status_code=500, detail=f"Error getting chat results: {e}")
|
125 |
|
|
|
|
|
126 |
def extract_text_from_webpage(html_content):
|
127 |
"""Extracts visible text from HTML content using BeautifulSoup."""
|
128 |
soup = BeautifulSoup(html_content, "html.parser")
|