+ 1
Why is the model not loading?
https://sololearn.com/compiler-playground/W4ZAX6V61iL1/?ref=app
8 Antworten
+ 5
The cat model isn't loading because the URL you're using to fetch the GLB file is invalid. The URL https://dl.dropbox.com/scl/fi/va7jzskhzjn7yumty8865/trotting_cat.glb?rlkey=u8ug9eq2mni57rm97b9e15lre&st=7f80klij& is for a shared Dropbox file.
Once you have a valid, direct URL, replace the current one in your loader.load() call:
JavaScript:
loader.load(
'your_new_valid_and_direct_url_to_trotting_cat.glb',
(gltf) => {
// ... rest of your code
},
undefined,
(error) => {
console.error('Failed to load GLB:', error);
}
);
+ 3
Sky? I remember this working before. It is working for me now/still. Did you fix it?
+ 2
Yup it's working now🔥
+ 1
But It used to work before, now it's not working idk. Does they change policies for 3d models?
+ 1
It now appears to be the text file not the correct glb ...
Are you running this outside of Sololearn and running correctly or did you create this inside / on sololearn platform?
+ 1
Yes I created this on sololearn before, u can check the comments
0
# Mobile-friendly Python code for generating "Artha" image
import openai
import requests
import os
# अपना OpenAI API key डालें
openai.api_key = "YOUR_API_KEY"
# इमेज generate करना
response = openai.images.generate(
model="gpt-image-1",
prompt="Artha नाम के लिए creative और colorful image, fantasy style",
size="512x512"
)
image_url = response['data'][0]['url']
print("Generated Image URL:", image_url)
# मोबाइल में download location
save_path = os.path.join(os.path.expanduser("~"), "Artha_image.png")
# इमेज download करना
image_data = requests.get(image_url).content
with open(save_path, "wb") as f:
f.write(image_data)
print(f"Image saved on your device as: {save_path}")