Spaces:
Running
Running
Shunfeng Zheng
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -232,13 +232,14 @@ def extract_spatial_entities(text):
|
|
232 |
def process_api(input_text):
|
233 |
# 这里编写实际的后端处理逻辑
|
234 |
|
235 |
-
return {
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
}
|
|
|
242 |
|
243 |
# 设置API格式为JSON
|
244 |
gr.Interface(
|
|
|
232 |
def process_api(input_text):
|
233 |
# 这里编写实际的后端处理逻辑
|
234 |
|
235 |
+
# return {
|
236 |
+
# "status": "success",
|
237 |
+
# # "result": f"Processed: {input_text.upper()}",
|
238 |
+
# # "result": f"Processed: {nlp(input_text).to_json()}",
|
239 |
+
# "result": f"Processed: {extract_spatial_entities(input_text)}",
|
240 |
+
# "timestamp": time.time()
|
241 |
+
# }
|
242 |
+
return extract_spatial_entities(input_text)
|
243 |
|
244 |
# 设置API格式为JSON
|
245 |
gr.Interface(
|