Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,8 @@ from starlette.requests import ClientDisconnect
|
|
| 4 |
|
| 5 |
def process(file):
|
| 6 |
try:
|
| 7 |
-
|
|
|
|
| 8 |
if not results:
|
| 9 |
return "No entities found."
|
| 10 |
return "\n".join([f"{text} -> {label}" for text, label in results])
|
|
|
|
| 4 |
|
| 5 |
def process(file):
|
| 6 |
try:
|
| 7 |
+
file_path = file.name # Extract the temp file path from NamedString
|
| 8 |
+
results = extract_entities_from_file(file_path)
|
| 9 |
if not results:
|
| 10 |
return "No entities found."
|
| 11 |
return "\n".join([f"{text} -> {label}" for text, label in results])
|