import gradio as gr def chat1(message,history): history = history or [] message = message.lower() if message.startswith("how many"): response = ("1 to 10") else: response = ("whatever man whatever manwhatever manwhatever manwhatever manwhatever manwhatever manwhatever manwhatever manwhatever manwhatever manwhatever man") history.append((message, response)) return history, history chatbot = gr.Chatbot() chatbot1 = gr.Chatbot() chatbot2 = gr.Chatbot() with gr.Blocks( title="", ) as demo: gr.Markdown("""
Efficient Fine tuning Of Large Language Models By: Rahul Adams, Gerylyn Gao, Rajevan Lograjh & Mahir Faisal Group Id: AR06 FLC: Alice Reuada
""") with gr.Tab("Text Classification"): with gr.Row(): gr.Markdown("

Efficient Fine Tuning for Text Classification

") with gr.Row(): with gr.Column(scale=0.3,variant="panel"): gr.Markdown("""

Specifciations

Model: Tiny Bert
Dataset: IMDB Movie review dataset
NLP Task: Text Classification

I don’t know why but I just enjoy doing this. Maybe it’s my way of dealing with stress or something but I just do it about once every week. Generally I’ll carry around a sack and creep around in a sort of crouch-walking position making goblin noises, then I’ll walk around my house and pick up various different “trinkets” and put them in my bag while saying stuff like “I’ll be having that” and laughing maniacally in my goblin voice (“trinkets” can include anything from stuff I find on the ground to cutlery or other utensils). The other day I was talking with my neighbours and they mentioned hearing weird noises like what I wrote about and I was just internally screaming the entire conversation.

""") with gr.Column(scale=0.3,variant="panel"): inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") btn = gr.Button("Run") gr.Examples( [ "I thought this was a bit contrived", "You would need to be a child to enjoy this", "Drive more like Drive away", ], inp, label="Try asking", ) with gr.Column(): with gr.Row(variant="panel"): out = gr.Textbox(label= " Untrained Model") gr.Markdown("""
Training Information





""") with gr.Row(variant="panel"): out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model") gr.Markdown("""
Training Information





""") with gr.Row(variant="panel"): out2 = gr.Textbox(label= " LoRA Fine Tuned Model") gr.Markdown("""
Training Information





""") btn.click(fn=chat1, inputs=inp, outputs=out) btn.click(fn=chat1, inputs=inp, outputs=out1) btn.click(fn=chat1, inputs=inp, outputs=out2) with gr.Tab("Natrual Language Infrencing"): with gr.Row(): gr.Markdown("

Efficient Fine Tuning for Natual Languae Infrencing

") with gr.Row(): with gr.Column(scale=0.3, variant="panel"): gr.Markdown("""

Specifciations

Model: ELECTRA Bert Small
Dataset: Stanford Natural Language Inference Dataset
NLP Task: Natual Languae Infrencing

insert information on training parameters here

""") with gr.Column(scale=0.3,variant="panel"): inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") btn = gr.Button("Run") gr.Examples( [ "I thought this was a bit contrived", "You would need to be a child to enjoy this", "Drive more like Drive away", ], inp, label="Try asking", ) with gr.Column(): with gr.Row(variant="panel"): out = gr.Textbox(label= " Untrained Model") gr.Markdown("""
Training Information





""") with gr.Row(variant="panel"): out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model") gr.Markdown("""
Training Information





""") with gr.Row(variant="panel"): out2 = gr.Textbox(label= " LoRA Fine Tuned Model") gr.Markdown("""
Training Information





""") with gr.Tab("Sematic Text Similarity"): with gr.Row(): gr.Markdown("

Efficient Fine Tuning for Semantic Text Similarity

") with gr.Row(): with gr.Column(scale=0.3,variant="panel"): gr.Markdown("""

Specifciations

Model: DeBERTa-v3-xsmall
Dataset: Quora Question Pairs dataset
NLP Task: Semantic Text Similarity

insert information on training parameters here

""") with gr.Column(scale=0.3,variant="panel"): inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") btn = gr.Button("Run") gr.Examples( [ "I thought this was a bit contrived", "You would need to be a child to enjoy this", "Drive more like Drive away", ], inp, label="Try asking", ) with gr.Column(): with gr.Row(variant="panel"): out = gr.Textbox(label= " Untrained Model") gr.Markdown("""
Training Information





""") with gr.Row(variant="panel"): out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model") gr.Markdown("""
Training Information





""") with gr.Row(variant="panel"): out2 = gr.Textbox(label= " LoRA Fine Tuned Model") gr.Markdown("""
Training Information





""") with gr.Tab("More information"): gr.Markdown("stuff to add") if __name__ == "__main__": demo.launch()