Spaces:
Sleeping
Sleeping
DongYubin
commited on
Commit
·
a23b87a
1
Parent(s):
306334f
更新
Browse files
app.py
CHANGED
@@ -14,19 +14,21 @@ os.environ["LANGCHAIN_PROJECT"] = "Sequential-Chain"
|
|
14 |
|
15 |
|
16 |
def main():
|
17 |
-
input_api_key = gr.inputs.Textbox(label="ChatGPT API Key", lines=1)
|
18 |
-
input_api_base = gr.inputs.Textbox(label="ChatGPT API 地址(默认无地址)", lines=1)
|
19 |
-
input_url = gr.inputs.Textbox(label="URL", lines=1)
|
20 |
-
outputs = gr.outputs.Textbox(label="输出")
|
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 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
demo.launch()
|
31 |
|
32 |
|
|
|
14 |
|
15 |
|
16 |
def main():
|
|
|
|
|
|
|
|
|
17 |
with gr.Blocks() as demo:
|
18 |
with gr.Tab("Component 1"): #标签页1
|
19 |
+
input_url1 = gr.inputs.Textbox(label="URL", lines=1)
|
20 |
+
outputs1 = gr.outputs.Textbox(label="输出")
|
21 |
+
gr.Interface(fn=my_inference_function,
|
22 |
+
inputs=input_url1,
|
23 |
+
outputs=outputs1)
|
24 |
with gr.Tab("Component 2"): #标签页2
|
25 |
+
input_api_key = gr.inputs.Textbox(label="ChatGPT API Key", lines=1)
|
26 |
+
input_api_base = gr.inputs.Textbox(label="ChatGPT API 地址(默认无地址)", lines=1)
|
27 |
+
input_url2 = gr.inputs.Textbox(label="URL", lines=1)
|
28 |
+
outputs2 = gr.outputs.Textbox(label="输出")
|
29 |
+
gr.Interface(fn=my_chatgpt_function,
|
30 |
+
inputs=[input_api_key, input_api_base, input_url2],
|
31 |
+
outputs=outputs2)
|
32 |
demo.launch()
|
33 |
|
34 |
|