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") 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): inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") btn = gr.Button("Run") gr.Markdown("""

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

insert information on training parameters here

""") with gr.Row(): with gr.Column(): out = gr.Textbox(label= " Untrained Model") with gr.Column(): out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model") with gr.Column(): out2 = gr.Textbox(label= " LoRA fine Tuned Model") 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): inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") btn = gr.Button("Run") gr.Markdown("""

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

insert information on training parameters here

""") with gr.Row(): with gr.Column(): out = gr.Textbox(label= " Untrained Model") with gr.Column(): out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model") with gr.Column(): out2 = gr.Textbox(label= " LoRA fine Tuned Model") 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): inp = gr.Textbox(placeholder="Prompt",label= "Enter Query") btn = gr.Button("Run") gr.Markdown("""

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

insert information on training parameters here

""") with gr.Row(): with gr.Column(): out = gr.Textbox(label= " Untrained Model") with gr.Column(): out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model") with gr.Column(): out2 = gr.Textbox(label= " LoRA fine Tuned Model") with gr.Tab("More information"): gr.Markdown("stuff to add") if __name__ == "__main__": demo.launch()