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