goberoi commited on
Commit
ff3a4f9
·
verified ·
1 Parent(s): 34abba7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,7 +4,8 @@ from starlette.requests import ClientDisconnect
4
 
5
  def process(file):
6
  try:
7
- results = extract_entities_from_file(file)
 
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])