Th3r0 commited on
Commit
61357d4
1 Parent(s): 00302d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +83 -21
app.py CHANGED
@@ -1,5 +1,3 @@
1
- #build theme
2
-
3
  import gradio as gr
4
 
5
  def chat1(message,history):
@@ -17,27 +15,91 @@ chatbot = gr.Chatbot()
17
  chatbot1 = gr.Chatbot()
18
  chatbot2 = gr.Chatbot()
19
 
20
- with gr.Blocks() as demo:
21
- gr.Markdown("Efficient Fine Tuning - Bert Model for Text Classification")
22
- #============================ ADD YOUR NAME ON LINE BELOW (LAST PERSON CAN REMOVE THIS COMMENT) ============================#
23
- gr.Markdown("By: Greylyn | Rahul | Rajevan | <Member 4>")
24
-
25
- with gr.Row():
26
- with gr.Column():
27
- inp = gr.Textbox(placeholder="Prompt",label= "Enter Query")
28
- btn = gr.Button("Run")
29
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  with gr.Row():
31
- with gr.Column():
32
- out = gr.Textbox()
33
- with gr.Column():
34
- out1 = gr.Textbox()
35
- with gr.Column():
36
- out2 = gr.Textbox()
37
-
38
- btn.click(fn=chat1, inputs=inp, outputs=out)
39
- btn.click(fn=chat1, inputs=inp, outputs=out1)
40
- btn.click(fn=chat1, inputs=inp, outputs=out2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  if __name__ == "__main__":
43
  demo.launch()
 
 
 
1
  import gradio as gr
2
 
3
  def chat1(message,history):
 
15
  chatbot1 = gr.Chatbot()
16
  chatbot2 = gr.Chatbot()
17
 
18
+ with gr.Blocks(
19
+ title="",
 
 
 
 
 
 
 
20
 
21
+ ) as demo:
22
+ gr.Markdown("""
23
+ <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);">
24
+ <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"/>
25
+ <span style="margin-top: 40px;font-size: 36px ;font-family:fantasy;">Efficient Fine tuning Of Large Language Models</span>
26
+ <span style="margin-top: 10px;font-size: 14px;">By: Rahul Adams, Gerylyn Gao, Rajevan Lograjh & Mahir Faisal</span>
27
+ <span style="margin-top: 5px;font-size: 14px;">Group Id: AR06 FLC: Alice Reuada</span>
28
+ </div>
29
+ """)
30
+ with gr.Tab("Text Classification"):
31
+ with gr.Row():
32
+ gr.Markdown("<h1>Efficient Fine Tuning for Text Classification</h1>")
33
  with gr.Row():
34
+ with gr.Column(scale=0.3):
35
+ inp = gr.Textbox(placeholder="Prompt",label= "Enter Query")
36
+ btn = gr.Button("Run")
37
+ gr.Markdown("""
38
+ <p>Model: Tiny Bert <br>
39
+ NLP Task: Text Classification <br>
40
+ Dataset: IMDB Movie review dataset for sentiment analysis</p>
41
+ <p>insert information on training parameters here</p>
42
+ """)
43
+
44
+ with gr.Row():
45
+ with gr.Column():
46
+ out = gr.Textbox(label= " Untrained Model")
47
+ with gr.Column():
48
+ out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model")
49
+ with gr.Column():
50
+ out2 = gr.Textbox(label= " LoRA fine Tuned Model")
51
+
52
+ btn.click(fn=chat1, inputs=inp, outputs=out)
53
+ btn.click(fn=chat1, inputs=inp, outputs=out1)
54
+ btn.click(fn=chat1, inputs=inp, outputs=out2)
55
+
56
+ with gr.Tab("Natrual Language Infrencing"):
57
+ with gr.Row():
58
+ gr.Markdown("<h1>Efficient Fine Tuning for Natual Languae Infrencing</h1>")
59
+ with gr.Row():
60
+ with gr.Column(scale=0.3):
61
+ inp = gr.Textbox(placeholder="Prompt",label= "Enter Query")
62
+ btn = gr.Button("Run")
63
+ gr.Markdown("""
64
+ <p>Model: ELECTRA Bert Small <br>
65
+ NLP Task: Natual Languae Infrencing <br>
66
+ Dataset: Stanford Natural Language Inference Dataset</p>
67
+ <p>insert information on training parameters here</p>
68
+ """)
69
+
70
+ with gr.Row():
71
+ with gr.Column():
72
+ out = gr.Textbox(label= " Untrained Model")
73
+ with gr.Column():
74
+ out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model")
75
+ with gr.Column():
76
+ out2 = gr.Textbox(label= " LoRA fine Tuned Model")
77
+
78
+ with gr.Tab("Sematic Text Similarity"):
79
+ with gr.Row():
80
+ gr.Markdown("<h1>Efficient Fine Tuning for Semantic Text Similarity</h1>")
81
+ with gr.Row():
82
+ with gr.Column(scale=0.3):
83
+ inp = gr.Textbox(placeholder="Prompt",label= "Enter Query")
84
+ btn = gr.Button("Run")
85
+ gr.Markdown("""
86
+ <p>Model: Tiny Bert <br>
87
+ NLP Task: Text Classification <br>
88
+ Dataset: IMDB Movie review dataset for sentiment analysis</p>
89
+ <p>insert information on training parameters here</p>
90
+ """)
91
+
92
+ with gr.Row():
93
+ with gr.Column():
94
+ out = gr.Textbox(label= " Untrained Model")
95
+ with gr.Column():
96
+ out1 = gr.Textbox(label= " Conventionaly Fine Tuned Model")
97
+ with gr.Column():
98
+ out2 = gr.Textbox(label= " LoRA fine Tuned Model")
99
+
100
+ with gr.Tab("More information"):
101
+ gr.Markdown("stuff to add")
102
+
103
 
104
  if __name__ == "__main__":
105
  demo.launch()