Spaces:
Running
on
Zero
Running
on
Zero
sergiopaniego
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,11 @@ import os
|
|
9 |
|
10 |
|
11 |
DESCRIPTION = """
|
12 |
-
# SmolVLM-trl-
|
13 |
|
14 |
-
This is a demo Space for a fine-tuned version of [SmolVLM](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) trained using [
|
15 |
|
16 |
-
The corresponding model is located [here](https://huggingface.co/sergiopaniego/smolvlm-instruct-trl-
|
17 |
"""
|
18 |
|
19 |
model_id = "HuggingFaceTB/SmolVLM-Instruct"
|
@@ -25,7 +25,7 @@ model = Idefics3ForConditionalGeneration.from_pretrained(
|
|
25 |
)
|
26 |
|
27 |
processor = AutoProcessor.from_pretrained(model_id)
|
28 |
-
adapter_path = "sergiopaniego/smolvlm-instruct-trl-
|
29 |
model.load_adapter(adapter_path)
|
30 |
|
31 |
def array_to_image_path(image_array):
|
@@ -102,7 +102,7 @@ css = """
|
|
102 |
|
103 |
with gr.Blocks(css=css) as demo:
|
104 |
gr.Markdown(DESCRIPTION)
|
105 |
-
with gr.Tab(label="SmolVLM-trl-
|
106 |
with gr.Row():
|
107 |
with gr.Column():
|
108 |
input_img = gr.Image(label="Input Picture")
|
|
|
9 |
|
10 |
|
11 |
DESCRIPTION = """
|
12 |
+
# SmolVLM-trl-dpo-rlaif-v Demo
|
13 |
|
14 |
+
This is a demo Space for a fine-tuned version of [SmolVLM](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) trained using [rlaif-v dataset](https://huggingface.co/datasets/HuggingFaceH4/rlaif-v_formatted).
|
15 |
|
16 |
+
The corresponding model is located [here](https://huggingface.co/sergiopaniego/smolvlm-instruct-trl-dpo-rlaif-v).
|
17 |
"""
|
18 |
|
19 |
model_id = "HuggingFaceTB/SmolVLM-Instruct"
|
|
|
25 |
)
|
26 |
|
27 |
processor = AutoProcessor.from_pretrained(model_id)
|
28 |
+
adapter_path = "sergiopaniego/smolvlm-instruct-trl-dpo-rlaif-v"
|
29 |
model.load_adapter(adapter_path)
|
30 |
|
31 |
def array_to_image_path(image_array):
|
|
|
102 |
|
103 |
with gr.Blocks(css=css) as demo:
|
104 |
gr.Markdown(DESCRIPTION)
|
105 |
+
with gr.Tab(label="SmolVLM-trl-dpo-rlaif-v Input"):
|
106 |
with gr.Row():
|
107 |
with gr.Column():
|
108 |
input_img = gr.Image(label="Input Picture")
|