Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
|
|
10 |
|
11 |
device='cpu'
|
12 |
|
13 |
-
model_id = "nttdataspain/vit-gpt2-
|
14 |
model = VisionEncoderDecoderModel.from_pretrained(model_id)
|
15 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
16 |
feature_extractor = ViTFeatureExtractor.from_pretrained(model_id)
|
@@ -37,10 +37,15 @@ with gr.Blocks() as demo:
|
|
37 |
gr.HTML(
|
38 |
"""
|
39 |
<div style="text-align: center; max-width: 1200px; margin: 20px auto;">
|
40 |
-
<
|
41 |
-
|
42 |
-
</
|
43 |
<h2 style="text-align: left; font-weight: 450; font-size: 1rem; margin-top: 2rem; margin-bottom: 1.5rem">
|
|
|
|
|
|
|
|
|
|
|
44 |
</div>
|
45 |
""")
|
46 |
|
|
|
10 |
|
11 |
device='cpu'
|
12 |
|
13 |
+
model_id = "nttdataspain/vit-gpt2-stablediffusion2-lora"
|
14 |
model = VisionEncoderDecoderModel.from_pretrained(model_id)
|
15 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
16 |
feature_extractor = ViTFeatureExtractor.from_pretrained(model_id)
|
|
|
37 |
gr.HTML(
|
38 |
"""
|
39 |
<div style="text-align: center; max-width: 1200px; margin: 20px auto;">
|
40 |
+
<h2 style="font-weight: 900; font-size: 3rem; margin: 0rem">
|
41 |
+
📸 ViT Image-to-Text with LORA 📝
|
42 |
+
</h2>
|
43 |
<h2 style="text-align: left; font-weight: 450; font-size: 1rem; margin-top: 2rem; margin-bottom: 1.5rem">
|
44 |
+
In the field of large language models, the challenge of fine-tuning has long perplexed researchers. Microsoft, however, has unveiled an innovative solution called <b>Low-Rank Adaptation (LoRA)</b>. With the emergence of behemoth models like GPT-3 boasting billions of parameters, the cost of fine-tuning them for specific tasks or domains has become exorbitant.
|
45 |
+
<br>
|
46 |
+
<br>
|
47 |
+
You can find more info here: <u><a href="https://medium.com/@daniel.puenteviejo/fine-tuning-image-to-text-algorithms-with-lora-deb22aa7da27" target="_blank">Medium article</a></u>
|
48 |
+
</h2>
|
49 |
</div>
|
50 |
""")
|
51 |
|