Aishwarya Solanki commited on
Commit
f061a57
·
1 Parent(s): 0c6486f

Refining UI

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -145,16 +145,13 @@ with gr.Blocks() as ui:
145
  gpt_key = gr.Textbox(label="Please input your GPT key", type="password")
146
  llama_key = gr.Textbox(label="Please input your Llama key", type="password")
147
  gemini_key = gr.Textbox(label="Please input your Gemini key", type="password")
148
-
149
  status_message = gr.HTML(label="Validation Status")
150
  gpt_key.input(fn=api_check_msg, inputs=[gpt_key, gr.Textbox(value="GPT")], outputs=status_message)
151
-
152
  status_message = gr.HTML(label="Validation Status")
153
  llama_key.input(fn=api_check_msg, inputs=[llama_key, gr.Textbox(value="Llama")], outputs=status_message)
154
-
155
  status_message = gr.HTML(label="Validation Status")
156
  gemini_key.input(fn=api_check_msg, inputs=[gemini_key, gr.Textbox(value="Gemini")], outputs=status_message)
157
-
158
  gr.Button(value="Don't have an LLM key? Get one through the below links.")
159
  gr.Button(value="OpenAi Key", link="https://platform.openai.com/account/api-keys")
160
  gr.Button(value="Meta Llama Key", link="https://platform.openai.com/account/api-keys")
@@ -166,7 +163,6 @@ with gr.Blocks() as ui:
166
  temperature = gr.Slider(0.0, 1.0, value=0.7, step = 0.01, label="Temperature", info="Set the Temperature")
167
  top_p = gr.Slider(1, 10, value=3, step = 1, label="top-p value", info="Set the sampling nucleus parameter")
168
  symptoms = gr.Textbox(label="Add the symptom data in the input to receive diagnosis")
169
-
170
  llm_btn = gr.Button(value="Diagnose Disease", variant="primary", elem_id="diagnose", interactive=False)
171
  symptoms.input(toggle_button, inputs=[symptoms, gpt_key, llama_key, gemini_key], outputs=llm_btn)
172
  output = gr.Textbox(label="LLM output with majority vote and confidence", interactive=False, placeholder="Output will appear here...")
 
145
  gpt_key = gr.Textbox(label="Please input your GPT key", type="password")
146
  llama_key = gr.Textbox(label="Please input your Llama key", type="password")
147
  gemini_key = gr.Textbox(label="Please input your Gemini key", type="password")
148
+ is_valid = False
149
  status_message = gr.HTML(label="Validation Status")
150
  gpt_key.input(fn=api_check_msg, inputs=[gpt_key, gr.Textbox(value="GPT")], outputs=status_message)
 
151
  status_message = gr.HTML(label="Validation Status")
152
  llama_key.input(fn=api_check_msg, inputs=[llama_key, gr.Textbox(value="Llama")], outputs=status_message)
 
153
  status_message = gr.HTML(label="Validation Status")
154
  gemini_key.input(fn=api_check_msg, inputs=[gemini_key, gr.Textbox(value="Gemini")], outputs=status_message)
 
155
  gr.Button(value="Don't have an LLM key? Get one through the below links.")
156
  gr.Button(value="OpenAi Key", link="https://platform.openai.com/account/api-keys")
157
  gr.Button(value="Meta Llama Key", link="https://platform.openai.com/account/api-keys")
 
163
  temperature = gr.Slider(0.0, 1.0, value=0.7, step = 0.01, label="Temperature", info="Set the Temperature")
164
  top_p = gr.Slider(1, 10, value=3, step = 1, label="top-p value", info="Set the sampling nucleus parameter")
165
  symptoms = gr.Textbox(label="Add the symptom data in the input to receive diagnosis")
 
166
  llm_btn = gr.Button(value="Diagnose Disease", variant="primary", elem_id="diagnose", interactive=False)
167
  symptoms.input(toggle_button, inputs=[symptoms, gpt_key, llama_key, gemini_key], outputs=llm_btn)
168
  output = gr.Textbox(label="LLM output with majority vote and confidence", interactive=False, placeholder="Output will appear here...")