Spaces:
Sleeping
Sleeping
DongYubin
commited on
Commit
·
306334f
1
Parent(s):
2a2ac0b
更新
Browse files
app.py
CHANGED
@@ -20,16 +20,13 @@ def main():
|
|
20 |
outputs = gr.outputs.Textbox(label="输出")
|
21 |
with gr.Blocks() as demo:
|
22 |
with gr.Tab("Component 1"): #标签页1
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
demo.add(interface1, "component1")
|
27 |
with gr.Tab("Component 2"): #标签页2
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
outputs=outputs)
|
32 |
-
demo.add(interface2, "component2")
|
33 |
demo.launch()
|
34 |
|
35 |
|
|
|
20 |
outputs = gr.outputs.Textbox(label="输出")
|
21 |
with gr.Blocks() as demo:
|
22 |
with gr.Tab("Component 1"): #标签页1
|
23 |
+
gr.Interface(fn=my_inference_function,
|
24 |
+
inputs=input_url,
|
25 |
+
outputs=outputs)
|
|
|
26 |
with gr.Tab("Component 2"): #标签页2
|
27 |
+
gr.Interface(fn=my_chatgpt_function,
|
28 |
+
inputs=[input_api_key, input_api_base, input_url],
|
29 |
+
outputs=outputs)
|
|
|
|
|
30 |
demo.launch()
|
31 |
|
32 |
|