Spaces:
Sleeping
Sleeping
File size: 537 Bytes
00d9204 2d8da02 00d9204 2d8da02 63f26f8 2d8da02 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
def parse_spatial(text):
# 在这里添加您的文本解析逻辑
return f"[Parsed Spatial Info] {text.upper()}"
# 创建 Gradio 接口,并指定 API 名称
demo = gr.Interface(
fn=parse_spatial,
inputs=gr.Textbox(lines=2, placeholder="Enter your spatial description here..."),
outputs="text",
title="Spatial Parser Demo",
description="Enter a spatial description and receive the parsed output.",
api_name="/predict"
)
# 启动应用
if __name__ == "__main__":
demo.launch()
|