Aishwarya Solanki commited on
Commit
9950991
·
1 Parent(s): 65f41a2
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -78,7 +78,6 @@ def diagnose(key, model, top_k, temperature, symptom_prompt):
78
 
79
 
80
  with gr.Blocks() as ui:
81
- message = "Hello, Welcome to the GUI by Team #9."
82
 
83
  with gr.Row(equal_height=500):
84
  with gr.Column(scale=1, min_width=300):
@@ -89,18 +88,16 @@ with gr.Blocks() as ui:
89
  gr.Button(value="OpenAi Key", link="https://platform.openai.com/account/api-keys")
90
  gr.Button(value="Meta Llama Key", link="https://platform.openai.com/account/api-keys")
91
  gr.Button(value="Gemini Key", link="https://platform.openai.com/account/api-keys")
92
- gr.ClearButton(key, message, variant="primary")
93
 
94
  with gr.Column(scale=2, min_width=600):
95
- message = gr.Textbox(label="", value=message, interactive=False, visible=True)
96
- output = gr.Textbox(label="Model output status", value="Model hasn't run yet.")
97
  temperature = gr.Slider(0.0, 1.0, value=0.7, step = 0.01, label="Temperature", info="Set the Temperature")
98
  top_k = gr.Slider(1, 10, value=3, step = 1, label="top-k value", info="Set the 'k' for top-k LLM responses")
99
  symptoms = gr.Textbox(label="Add the symptom data in the input to receive diagnosis")
100
  llm_btn = gr.Button(value="Diagnose Disease", variant="primary", elem_id="diagnose")
 
101
  llm_btn.click(fn=diagnose, inputs=[key, model, top_k, temperature, symptoms], outputs=output, api_name="auditor")
102
- output = gr.Textbox(label="LLM output status", value=output.value)
103
-
104
 
105
 
106
  ui.launch(share=True)
 
78
 
79
 
80
  with gr.Blocks() as ui:
 
81
 
82
  with gr.Row(equal_height=500):
83
  with gr.Column(scale=1, min_width=300):
 
88
  gr.Button(value="OpenAi Key", link="https://platform.openai.com/account/api-keys")
89
  gr.Button(value="Meta Llama Key", link="https://platform.openai.com/account/api-keys")
90
  gr.Button(value="Gemini Key", link="https://platform.openai.com/account/api-keys")
91
+ gr.ClearButton(key, variant="primary")
92
 
93
  with gr.Column(scale=2, min_width=600):
94
+ gr.Markdown("### Hello, Welcome to the GUI by Team #9.")
 
95
  temperature = gr.Slider(0.0, 1.0, value=0.7, step = 0.01, label="Temperature", info="Set the Temperature")
96
  top_k = gr.Slider(1, 10, value=3, step = 1, label="top-k value", info="Set the 'k' for top-k LLM responses")
97
  symptoms = gr.Textbox(label="Add the symptom data in the input to receive diagnosis")
98
  llm_btn = gr.Button(value="Diagnose Disease", variant="primary", elem_id="diagnose")
99
+ output = gr.Textbox(label="LLM Output Status", interactive=False, placeholder="Output will appear here...")
100
  llm_btn.click(fn=diagnose, inputs=[key, model, top_k, temperature, symptoms], outputs=output, api_name="auditor")
 
 
101
 
102
 
103
  ui.launch(share=True)