research14 commited on
Commit
cffdbce
·
1 Parent(s): 04fb6c5

added more options to the interface

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -6,17 +6,20 @@ theme = gr.themes.Soft()
6
  def echo_text(input_text):
7
  return input_text
8
 
9
- iface = gr.Interface(
10
  fn=echo_text,
11
- inputs=gr.Textbox(text="Enter text here..."),
12
  outputs=gr.Textbox(),
13
  live=True,
14
  title="LLM Evaluator with Linguistic Scrutiny",
15
  theme=theme
16
- )
17
-
18
- with iface as demo:
19
  blocks = gr.Blocks()
 
 
 
 
 
20
 
21
  # Strategy 1 - QA-Based Prompting
22
  strategy1_title = gr.Textbox("Strategy 1 - QA-Based Prompting", style="font-weight: bold; font-size: 16px;")
@@ -37,7 +40,7 @@ with iface as demo:
37
  flant5_btn = gr.Button("Flan-T5")
38
 
39
  # Strategy 3 - Structured Prompting
40
- strategy3_title = gr.Textbox("Strategy 3 - Structured Prompting", style="font-weight: bold; font-size: 16px;")
41
  with gr.Row():
42
  chatgpt_btn = gr.Button("ChatGPT")
43
  llama_btn = gr.Button("LLaMA")
@@ -45,4 +48,4 @@ with iface as demo:
45
  alpaca_btn = gr.Button("Alpaca")
46
  flant5_btn = gr.Button("Flan-T5")
47
 
48
- demo.launch()
 
6
  def echo_text(input_text):
7
  return input_text
8
 
9
+ with gr.Interface(
10
  fn=echo_text,
11
+ inputs=gr.Textbox("Enter text here..."),
12
  outputs=gr.Textbox(),
13
  live=True,
14
  title="LLM Evaluator with Linguistic Scrutiny",
15
  theme=theme
16
+ ) as iface:
 
 
17
  blocks = gr.Blocks()
18
+
19
+ with gr.Row():
20
+ vicuna_model_selector = gr.Dropdown(["7b", "13b", "33b"], label="Vicuna Model", default="7b")
21
+ llama_model_selector = gr.Dropdown(["7B", "13B", "30B", "65B"], label="LLaMa Model", default="7B")
22
+ chatgpt_api_key = gr.Textbox(label="ChatGPT API Key", type="password")
23
 
24
  # Strategy 1 - QA-Based Prompting
25
  strategy1_title = gr.Textbox("Strategy 1 - QA-Based Prompting", style="font-weight: bold; font-size: 16px;")
 
40
  flant5_btn = gr.Button("Flan-T5")
41
 
42
  # Strategy 3 - Structured Prompting
43
+ strategy3_title = gr.Textbox("Strategy 3 - Structured Prompting", style="font-weight: bold; font-size: 16px")
44
  with gr.Row():
45
  chatgpt_btn = gr.Button("ChatGPT")
46
  llama_btn = gr.Button("LLaMA")
 
48
  alpaca_btn = gr.Button("Alpaca")
49
  flant5_btn = gr.Button("Flan-T5")
50
 
51
+ iface.launch()