File size: 2,114 Bytes
e8e247e
081b46f
814e7e2
 
df2a22b
 
 
 
 
 
814e7e2
a845f21
 
6f1af31
cffdbce
75ef19a
8a2b7a1
7b8870b
df2a22b
814e7e2
 
 
cffdbce
04fb6c5
cffdbce
 
8a2b7a1
 
 
bbfeeba
04fb6c5
a7b414a
 
 
 
 
 
 
bbfeeba
04fb6c5
a7b414a
 
 
 
 
 
 
b3f873e
04fb6c5
a7b414a
 
 
 
 
 
 
04fb6c5
cffdbce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import gradio as gr

theme = gr.themes.Soft()

query_examples=[
    ("Default Option 1"),
    ("Default Option 2"),
    ("Default Option 3")
]

# Define a function that echoes the input text
def echo_text(input_text):
    return input_text

with gr.Interface(
    fn=echo_text,
    inputs=gr.Textbox(placeholder="Enter text here..."),
    outputs=gr.Textbox(),
    examples=query_examples, 
    live=True,
    title="LLM Evaluator with Linguistic Scrutiny",
    theme=theme
) as iface:
    blocks = gr.Blocks()
    
    with gr.Row():
        vicuna_model_selector = gr.Dropdown(["7b", "13b", "33b"], label="Vicuna Model", placeholder="Select model size")
        llama_model_selector = gr.Dropdown(["7B", "13B", "30B", "65B"], label="LLaMa Model", placeholder="Select model size")
        chatgpt_api_key = gr.Textbox(label="ChatGPT API Key", type="password", placeholder="Enter your API key")

    # Strategy 1 - QA-Based Prompting
    with gr.Accordion("Strategy 1 - QA-Based Prompting", style="font-weight: bold; font-size: 16px;"):
        with gr.Row():
            chatgpt_btn = gr.Button("ChatGPT")
            llama_btn = gr.Button("LLaMA")
            vicuna_btn = gr.Button("Vicuna")
            alpaca_btn = gr.Button("Alpaca")
            flant5_btn = gr.Button("Flan-T5")

    # Strategy 2 - Instruction-Based Prompting
    with gr.Accordion("Strategy 2 - Instruction-Based Prompting", style="font-weight: bold; font-size: 16px;"):
        with gr.Row():
            chatgpt_btn = gr.Button("ChatGPT")
            llama_btn = gr.Button("LLaMA")
            vicuna_btn = gr.Button("Vicuna")
            alpaca_btn = gr.Button("Alpaca")
            flant5_btn = gr.Button("Flan-T5")

    # Strategy 3 - Structured Prompting
    with gr.Accordion("Strategy 3 - Structured Prompting", style="font-weight: bold; font-size: 16px;"):
        with gr.Row():
            chatgpt_btn = gr.Button("ChatGPT")
            llama_btn = gr.Button("LLaMA")
            vicuna_btn = gr.Button("Vicuna")
            alpaca_btn = gr.Button("Alpaca")
            flant5_btn = gr.Button("Flan-T5")
    
    iface.launch()