Spaces:
Sleeping
Sleeping
Update app.py
Browse filesTest using pipeline with my trained distilBERT no LORA
app.py
CHANGED
|
@@ -1,4 +1,11 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def chat1(message,history):
|
| 4 |
history = history or []
|
|
@@ -23,7 +30,7 @@ with gr.Blocks(
|
|
| 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,
|
| 27 |
<span style="margin-top: 5px;font-size: 14px;">Group Id: AR06 FLC: Alice Reuada</span>
|
| 28 |
</div>
|
| 29 |
""")
|
|
@@ -75,7 +82,7 @@ with gr.Blocks(
|
|
| 75 |
<span><br><br><br><br><br></span>
|
| 76 |
</div>""")
|
| 77 |
|
| 78 |
-
btn.click(fn=
|
| 79 |
btn.click(fn=chat1, inputs=inp, outputs=out1)
|
| 80 |
btn.click(fn=chat1, inputs=inp, outputs=out2)
|
| 81 |
|
|
@@ -178,4 +185,4 @@ with gr.Blocks(
|
|
| 178 |
|
| 179 |
|
| 180 |
if __name__ == "__main__":
|
| 181 |
-
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
# Handle calls to DistilBERT no LORA
|
| 5 |
+
distilBERTnoLORA_pipe = pipeline(model="Intradiction/text_classification_NoLORA")
|
| 6 |
+
|
| 7 |
+
def distilBERTnoLORA_fn(text):
|
| 8 |
+
return distilBERTnoLORA_pipe(text)
|
| 9 |
|
| 10 |
def chat1(message,history):
|
| 11 |
history = history or []
|
|
|
|
| 30 |
<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);">
|
| 31 |
<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"/>
|
| 32 |
<span style="margin-top: 40px;font-size: 36px ;font-family:fantasy;">Efficient Fine tuning Of Large Language Models</span>
|
| 33 |
+
<span style="margin-top: 10px;font-size: 14px;">By: Rahul Adams, Greylyn Gao, Rajevan Lograjh & Mahir Faisal</span>
|
| 34 |
<span style="margin-top: 5px;font-size: 14px;">Group Id: AR06 FLC: Alice Reuada</span>
|
| 35 |
</div>
|
| 36 |
""")
|
|
|
|
| 82 |
<span><br><br><br><br><br></span>
|
| 83 |
</div>""")
|
| 84 |
|
| 85 |
+
btn.click(fn=distilBERTnoLORA_fn, inputs=inp, outputs=out)
|
| 86 |
btn.click(fn=chat1, inputs=inp, outputs=out1)
|
| 87 |
btn.click(fn=chat1, inputs=inp, outputs=out2)
|
| 88 |
|
|
|
|
| 185 |
|
| 186 |
|
| 187 |
if __name__ == "__main__":
|
| 188 |
+
demo.launch()
|