Canyu commited on
Commit
ac4fa5c
·
1 Parent(s): 5fcc3eb
Files changed (1) hide show
  1. app.py +1 -15
app.py CHANGED
@@ -126,18 +126,4 @@ def run_demo_server():
126
 
127
  if __name__ == '__main__':
128
 
129
- # 在公共 Space 中,通过 gradio.client 调用私有 Space
130
- def call_private_space(input_text):
131
- # 加载私有 Space(假设是私有 Space 的名称)
132
- app = gr.Interface.load("Canyu/Diception", use_auth_token=True)
133
-
134
- # 调用私有 Space 中的函数
135
- output = app(input_text)
136
-
137
- return output
138
-
139
- # 创建一个公共 Space 界面,允许用户输入数据并调用私有 Space 中的函数
140
- interface = gr.Interface(fn=call_private_space, inputs="text", outputs="text")
141
-
142
- # 启动公共 Space
143
- interface.launch()
 
126
 
127
  if __name__ == '__main__':
128
 
129
+ run_demo_server()