Spaces:
Runtime error
Runtime error
File size: 1,860 Bytes
e8e247e 081b46f 814e7e2 a845f21 6f1af31 cffdbce 75ef19a cffdbce 7b8870b 814e7e2 cffdbce 04fb6c5 cffdbce bbfeeba 04fb6c5 b9ec6e6 bbfeeba 04fb6c5 bbfeeba b3f873e 04fb6c5 cffdbce b9ec6e6 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 |
import gradio as gr
theme = gr.themes.Soft()
# 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("Enter text here..."),
outputs=gr.Textbox(),
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", default="7b")
llama_model_selector = gr.Dropdown(["7B", "13B", "30B", "65B"], label="LLaMa Model", default="7B")
chatgpt_api_key = gr.Textbox(label="ChatGPT API Key", type="password")
# Strategy 1 - QA-Based Prompting
strategy1_title = gr.Textbox("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
strategy2_title = gr.Textbox("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
strategy3_title = gr.Textbox("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()
|