Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def extract_text_from_url(url):
|
|
18 |
headers = {
|
19 |
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
|
20 |
}
|
21 |
-
response = requests.get(url, headers=headers
|
22 |
response.raise_for_status()
|
23 |
|
24 |
soup = BeautifulSoup(response.content, 'html.parser')
|
@@ -77,8 +77,7 @@ def extract_entities_and_relationships(text):
|
|
77 |
}
|
78 |
],
|
79 |
max_tokens=2000,
|
80 |
-
temperature=0.3
|
81 |
-
timeout=30
|
82 |
)
|
83 |
|
84 |
if not completion.choices or not completion.choices[0].message:
|
|
|
18 |
headers = {
|
19 |
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
|
20 |
}
|
21 |
+
response = requests.get(url, headers=headers)
|
22 |
response.raise_for_status()
|
23 |
|
24 |
soup = BeautifulSoup(response.content, 'html.parser')
|
|
|
77 |
}
|
78 |
],
|
79 |
max_tokens=2000,
|
80 |
+
temperature=0.3
|
|
|
81 |
)
|
82 |
|
83 |
if not completion.choices or not completion.choices[0].message:
|