Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def test_handler(optionSelection, prompt: str = "Write an introductory paragraph
|
|
46 |
|
47 |
with gr.Blocks() as LLMDemoTabbedScreen:
|
48 |
with gr.Tab("Text-to-Text (Text Completion)"):
|
49 |
-
|
50 |
test_string = gr.Textbox(label="Try String", value=TEST_MESSAGE, lines=2)
|
51 |
test_string_response = gr.Textbox(label="Response")
|
52 |
test_string_output_info = gr.Label(value="Output Info", label="Info")
|
@@ -54,7 +54,7 @@ with gr.Blocks() as LLMDemoTabbedScreen:
|
|
54 |
|
55 |
|
56 |
test_button.click(
|
57 |
-
fn=
|
58 |
inputs=[llm_api_options, test_string],
|
59 |
outputs=[test_string_output_info, test_string_response]
|
60 |
)
|
|
|
46 |
|
47 |
with gr.Blocks() as LLMDemoTabbedScreen:
|
48 |
with gr.Tab("Text-to-Text (Text Completion)"):
|
49 |
+
llm_api_options = gr.Radio(llm_api_options, label="Select one", info="Which service do you want to use?", value="OpenAI API")
|
50 |
test_string = gr.Textbox(label="Try String", value=TEST_MESSAGE, lines=2)
|
51 |
test_string_response = gr.Textbox(label="Response")
|
52 |
test_string_output_info = gr.Label(value="Output Info", label="Info")
|
|
|
54 |
|
55 |
|
56 |
test_button.click(
|
57 |
+
fn=test_handler,
|
58 |
inputs=[llm_api_options, test_string],
|
59 |
outputs=[test_string_output_info, test_string_response]
|
60 |
)
|