Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,10 @@ import gradio as gr
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
# Load model directly
|
4 |
from transformers import AutoModelForCausalLM
|
|
|
|
|
|
|
|
|
5 |
|
6 |
model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-large", trust_remote_code=True)
|
7 |
"""
|
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
# Load model directly
|
4 |
from transformers import AutoModelForCausalLM
|
5 |
+
# Use a pipeline as a high-level helper
|
6 |
+
from transformers import pipeline
|
7 |
+
|
8 |
+
pipe = pipeline("visual-question-answering", model="openbmb/MiniCPM-Llama3-V-2_5", trust_remote_code=True)
|
9 |
|
10 |
model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-large", trust_remote_code=True)
|
11 |
"""
|