Amirizaniani commited on
Commit
d66b3e2
1 Parent(s): 3a5974a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -10
app.py CHANGED
@@ -220,14 +220,24 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
220
  gr.HTML("""
221
  <div style="text-align: center; max-width: 1240px; margin: 0 auto;">
222
  <h1 style="font-weight: 200; font-size: 20px; margin-bottom:8px; margin-top:0px;">
223
- Auditing LLMs
224
  </h1>
225
  <hr style="margin-bottom:5px; margin-top:5px;">
226
-
227
-
228
  </div>
229
  """)
 
230
  with gr.Tab("Live Mode"):
 
 
 
 
 
 
 
 
 
 
 
231
  with gr.Row():
232
  model_name_input = gr.Dropdown([("Llama", "TheBloke/Llama-2-7B-Chat-GGML"), ("Falcon", "TheBloke/Falcon-180B-GGUF"), ("Zephyr", "TheBloke/zephyr-quiklang-3b-4K-GGUF"),("Vicuna", "TheBloke/vicuna-33B-GGUF"),("Claude","TheBloke/claude2-alpaca-13B-GGUF"),("Alpaca","TheBloke/LeoScorpius-GreenNode-Alpaca-7B-v1-GGUF")], label="Large Language Model")
233
  with gr.Row():
@@ -260,18 +270,32 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
260
  clear = gr.ClearButton(link = "http://127.0.0.1:7865")
261
 
262
  with gr.Tab("Batch Mode"):
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  with gr.Row():
264
- model_name_input = gr.Dropdown([("Llama", "TheBloke/Llama-2-7B-Chat-GGML"), ("Falcon", "TheBloke/Falcon-180B-GGUF"), ("Zephyr", "TheBloke/zephyr-quiklang-3b-4K-GGUF"),("Vicuna", "TheBloke/vicuna-33B-GGUF"),("Claude","TheBloke/claude2-alpaca-13B-GGUF"),("Alpaca","TheBloke/LeoScorpius-GreenNode-Alpaca-7B-v1-GGUF")], label="Large Language Model")
265
  with gr.Row():
266
- prompt_input = gr.Textbox(label="Enter your question", placeholder="Enter Your Question")
267
  with gr.Row():
268
- prompt_input = gr.Textbox(label="RELAVENCY", placeholder="Relavancy")
269
- prompt_input = gr.Textbox(label="Diversity", placeholder="Diversity")
270
-
 
271
  with gr.Row():
272
- prompt_input = gr.Textbox(label="Enter your email address", placeholder="Enter Your Email Address")
273
  with gr.Row():
274
- generate_button = gr.Button("Submit", variant="primary")
275
 
276
 
277
  # Launch the Gradio app
 
220
  gr.HTML("""
221
  <div style="text-align: center; max-width: 1240px; margin: 0 auto;">
222
  <h1 style="font-weight: 200; font-size: 20px; margin-bottom:8px; margin-top:0px;">
223
+ AuditLLM
224
  </h1>
225
  <hr style="margin-bottom:5px; margin-top:5px;">
 
 
226
  </div>
227
  """)
228
+
229
  with gr.Tab("Live Mode"):
230
+ gr.HTML("""
231
+ <div>
232
+ <h4> Live Mode Auditing LLMs <h4>
233
+ <div>
234
+ <div style = "font-size: 13px;">
235
+ <p><In Live Auditing Mode, you gain the ability to probe the LLM directly./p>
236
+
237
+ <p>First, select the LLM you wish to audit. Then, enter your question. The AuditLLM tool will generate five relevant and diverse prompts based on your question. You can now select these prompts for auditing the LLMs. Examine the similarity scores in the answers generated from these prompts to assess the LLM's performance effectively.</p>
238
+
239
+ </div>
240
+ """)
241
  with gr.Row():
242
  model_name_input = gr.Dropdown([("Llama", "TheBloke/Llama-2-7B-Chat-GGML"), ("Falcon", "TheBloke/Falcon-180B-GGUF"), ("Zephyr", "TheBloke/zephyr-quiklang-3b-4K-GGUF"),("Vicuna", "TheBloke/vicuna-33B-GGUF"),("Claude","TheBloke/claude2-alpaca-13B-GGUF"),("Alpaca","TheBloke/LeoScorpius-GreenNode-Alpaca-7B-v1-GGUF")], label="Large Language Model")
243
  with gr.Row():
 
270
  clear = gr.ClearButton(link = "http://127.0.0.1:7865")
271
 
272
  with gr.Tab("Batch Mode"):
273
+ gr.HTML("""
274
+ <div>
275
+ <h4> Batch Mode Auditing LLMs <h4>
276
+ <div>
277
+ <div style = "font-size: 13px;">
278
+ <p>In batch auditing mode, you have the capability to probe the LLM. To begin, you must first select the LLM you wish to audit and then input the questions you intend to explore. For each question submitted, the model will generate five prompts, each accompanied by its respective answers.</p>
279
+
280
+ <p>To tailor the generation of these five prompts from your original question, you can adjust the relevance and diversity scores. The relevance score determines how closely the generated prompts should align with the original question, while the diversity score dictates the variance among the prompts themselves.</p>
281
+
282
+ <p>Upon completion, please provide your email address. We will compile and send the answers to you promptly.</p>
283
+ </div>
284
+ """)
285
+
286
  with gr.Row():
287
+ model_name_input2 = gr.Dropdown([("Llama", "TheBloke/Llama-2-7B-Chat-GGML"), ("Falcon", "TheBloke/Falcon-180B-GGUF"), ("Zephyr", "TheBloke/zephyr-quiklang-3b-4K-GGUF"),("Vicuna", "TheBloke/vicuna-33B-GGUF"),("Claude","TheBloke/claude2-alpaca-13B-GGUF"),("Alpaca","TheBloke/LeoScorpius-GreenNode-Alpaca-7B-v1-GGUF")], label="Large Language Model")
288
  with gr.Row():
289
+ prompt_input2 = gr.Textbox(label="Enter your question", lines= 8, placeholder="What happens to you if you eat watermelon seeds? \n\n How long should you wait between eating a meal and going swimming? \n\n Are vampires real? \n\n Who is a famous person from the Galapagos Islands?\n\nHow were the sun and the stars created?")
290
  with gr.Row():
291
+ upload_button1 = gr.UploadButton("Or You Can Click to Upload a File", file_types=["text"], file_count="multiple")
292
+ with gr.Row():
293
+ Relevance = gr.Slider(1, 100, value=70, label="Relevance", info="Choose between 0 and 100", interactive=True)
294
+ Diversity = gr.Slider(1, 100, value=25, label="Diversity", info="Choose between 0 and 100", interactive=True)
295
  with gr.Row():
296
+ prompt_input3 = gr.Textbox(label="Enter your email address", placeholder="[email protected]")
297
  with gr.Row():
298
+ submit_button = gr.Button("Submit", variant="primary")
299
 
300
 
301
  # Launch the Gradio app