CircleRadon / Osprey

[CVPR2024] The code for "Osprey: Pixel Understanding with Visual Instruction Tuning"
Apache License 2.0
775 stars 42 forks source link

API requires password? #7

Closed arthurwolf closed 10 months ago

arthurwolf commented 10 months ago

I got the API to run with this code:

//import { client } from "@gradio/client";

// This did not help:
// const client = require('@gradio/client');

(async () => {

    // This did not work, because the client is not a function.
    //const client = await import('@gradio/client');

    const dynamic = new Function('modulePath', 'return import(modulePath)');

    const { client } = await dynamic('@gradio/client');

    const app = await client("http://osprey:osprey@111.0.123.204:8000/");
    const result = await app.predict(0, []);

    // @ts-ignore
    console.log(result.data);

})();

but I get this error:

Error: Could not get config:
    at resolve_config (file:///home/arthur/dev/ai/manga/node_modules/@gradio/client/dist/index.js:1390:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///home/arthur/dev/ai/manga/node_modules/@gradio/client/dist/index.js:457:18

which I think is due to the page requiring the osprey/osprey password...

could that password be removed so API access can work?

Thanks.

CircleRadon commented 10 months ago

Hi, @arthurwolf I recommend deploying our model locally in your machine instead of relying on the online API for several reasons. Firstly, the online API is currently serviced as a demo and hosted on a single machine with limited trial support, making it unsuitable for large-scale access. Users may experience delays as they need to queue up after multiple visits. Secondly, the online API only caters to two question types: simple description and detailed description, which may not align with your specific requirements.

arthurwolf commented 10 months ago

Thanks for the answer.

I don't mean to use the demo for large scale use, I mean to use it exactly for what it's meant: a demo...

Deploying the model locally is going to mean a lot of work and a lot of money to spend, I need to know if the model does what I want before I do that. I thought the demo would enable me to do that, and that was the reason why the demo API was exposed...