Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def generate_caption(image_base64, api_key):
|
|
49 |
api_url = "https://api.studio.nebius.ai/v1/chat/completions"
|
50 |
headers = {"Authorization": f"Bearer {api_key}"}
|
51 |
payload = {
|
52 |
-
"model": "
|
53 |
"messages": [
|
54 |
{
|
55 |
"role": "system",
|
@@ -77,8 +77,7 @@ def generate_caption(image_base64, api_key):
|
|
77 |
st.error(f"An exception occurred: {e}")
|
78 |
return {"error": str(e)}
|
79 |
|
80 |
-
|
81 |
-
st.title("Generate Caption from Image")
|
82 |
|
83 |
uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
84 |
|
|
|
49 |
api_url = "https://api.studio.nebius.ai/v1/chat/completions"
|
50 |
headers = {"Authorization": f"Bearer {api_key}"}
|
51 |
payload = {
|
52 |
+
"model": "llava-hf/llava-1.5-13b-hf",
|
53 |
"messages": [
|
54 |
{
|
55 |
"role": "system",
|
|
|
77 |
st.error(f"An exception occurred: {e}")
|
78 |
return {"error": str(e)}
|
79 |
|
80 |
+
|
|
|
81 |
|
82 |
uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
83 |
|