Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,17 +37,11 @@ def apifunction():
|
|
| 37 |
print('here',data)
|
| 38 |
# Extracting values
|
| 39 |
if data:
|
| 40 |
-
#
|
| 41 |
-
|
| 42 |
-
import json
|
| 43 |
-
allapi = json.loads(data["allapi"])
|
| 44 |
-
else:
|
| 45 |
-
allapi = data.get("allapi")
|
| 46 |
-
|
| 47 |
-
# Pass parsed `allapi` to `apiFiltering`
|
| 48 |
-
jsonOutput = pdftotext.apiFiltering(allapi)
|
| 49 |
return jsonify(jsonOutput)
|
| 50 |
|
|
|
|
| 51 |
|
| 52 |
except Exception as e:
|
| 53 |
print(f"Error: {e}")
|
|
|
|
| 37 |
print('here',data)
|
| 38 |
# Extracting values
|
| 39 |
if data:
|
| 40 |
+
# Pass the raw JSON data to the filtering function
|
| 41 |
+
jsonOutput = pdftotext.apiFiltering(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
return jsonify(jsonOutput)
|
| 43 |
|
| 44 |
+
|
| 45 |
|
| 46 |
except Exception as e:
|
| 47 |
print(f"Error: {e}")
|