File size: 9,184 Bytes
0d23076
 
ffc18a3
 
 
 
 
 
5db0d3c
ffc18a3
 
 
 
 
 
 
 
61357d4
 
ffc18a3
61357d4
 
 
 
 
 
 
 
 
 
 
 
ffc18a3
5db0d3c
61357d4
5db0d3c
 
 
 
 
61357d4
5db0d3c
 
 
 
 
 
 
 
 
 
 
 
 
61357d4
5db0d3c
 
 
 
 
 
 
 
 
61357d4
5db0d3c
 
 
 
 
 
 
 
 
 
 
61357d4
 
 
 
 
 
 
 
 
5db0d3c
61357d4
5db0d3c
 
 
 
61357d4
 
5db0d3c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61357d4
5db0d3c
61357d4
5db0d3c
 
 
 
 
 
 
 
 
 
 
61357d4
 
 
 
 
5db0d3c
61357d4
5db0d3c
 
 
 
61357d4
 
5db0d3c
 
 
 
 
 
 
 
 
 
 
 
61357d4
5db0d3c
 
 
 
 
 
 
 
 
61357d4
5db0d3c
 
 
 
 
 
 
 
 
 
 
61357d4
 
 
 
0d23076
 
ffc18a3
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
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("""
        <div style="overflow: hidden;color:#fff;display: flex;flex-direction: column;align-items: center; position: relative; width: 100%; height: 180px;background-size: cover; background-image: url(https://www.grssigns.co.uk/wp-content/uploads/web-Header-Background.jpg);">
            <img style="width: 130px;height: 60px;position: absolute;top:10px;left:10px" src="https://www.torontomu.ca/content/dam/tmumobile/images/TMU-Mobile-AppIcon.png"/>
            <span style="margin-top: 40px;font-size: 36px ;font-family:fantasy;">Efficient Fine tuning Of Large Language Models</span>
            <span style="margin-top: 10px;font-size: 14px;">By: Rahul Adams, Gerylyn Gao, Rajevan Lograjh & Mahir Faisal</span>
            <span style="margin-top: 5px;font-size: 14px;">Group Id: AR06 FLC: Alice Reuada</span>
        </div>
    """)
    with gr.Tab("Text Classification"):
        with gr.Row():
            gr.Markdown("<h1>Efficient Fine Tuning for Text Classification</h1>")
        with gr.Row():
            with gr.Column(scale=0.3,variant="panel"):
                gr.Markdown("""
                            <h2>Specifciations</h2>
                            <p><b>Model:</b> Tiny Bert <br>
                            <b>Dataset:</b> IMDB Movie review dataset <br>
                            <b>NLP Task:</b> Text Classification</p>
                            <p>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 shit 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.</p>
                            """)
                
            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("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

                with gr.Row(variant="panel"):
                    out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model")
                    gr.Markdown("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

                with gr.Row(variant="panel"):
                    out2 = gr.Textbox(label= " LoRA Fine Tuned Model")
                    gr.Markdown("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

        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("<h1>Efficient Fine Tuning for Natual Languae Infrencing</h1>")
         with gr.Row():
            with gr.Column(scale=0.3, variant="panel"):
                gr.Markdown("""
                            <h2>Specifciations</h2>
                            <p><b>Model:</b>  ELECTRA Bert Small <br>
                            <b>Dataset:</b> Stanford Natural Language Inference Dataset <br>
                            <b>NLP Task:</b> Natual Languae Infrencing</p>
                            <p>insert information on training parameters here</p>
                            """)
            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("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

                with gr.Row(variant="panel"):
                    out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model")
                    gr.Markdown("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

                with gr.Row(variant="panel"):
                    out2 = gr.Textbox(label= " LoRA Fine Tuned Model")
                    gr.Markdown("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

    with gr.Tab("Sematic Text Similarity"):
         with gr.Row():
             gr.Markdown("<h1>Efficient Fine Tuning for Semantic Text Similarity</h1>")
         with gr.Row():
            with gr.Column(scale=0.3,variant="panel"):
                gr.Markdown("""
                            <h2>Specifciations</h2>
                            <p><b>Model:</b> DeBERTa-v3-xsmall <br>
                            <b>Dataset:</b> Quora Question Pairs dataset <br>
                            <b>NLP Task:</b> Semantic Text Similarity</p>
                            <p>insert information on training parameters here</p>
                            """)
            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("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

                with gr.Row(variant="panel"):
                    out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model")
                    gr.Markdown("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

                with gr.Row(variant="panel"):
                    out2 = gr.Textbox(label= " LoRA Fine Tuned Model")
                    gr.Markdown("""<div>
                                <span><center><B>Training Information</B><center></span>
                                <span><br><br><br><br><br></span>
                                </div>""")

    with gr.Tab("More information"):
        gr.Markdown("stuff to add")


if __name__ == "__main__":
    demo.launch()