Giter Club home page Giter Club logo

Comments (11)

pseudotensor avatar pseudotensor commented on July 17, 2024

Can you reproduce on gpt.h2o.ai?

I am able to ask a question about a PDF, see sources, then click on the pdf link, and then it downloads that pdf as expected.

To view the pdf directly in the app you need to use the "Document Viewer" page.

Did you reinstall all dependencies as in README_linux.md? Since back then, there's simple script to use.

from h2ogpt.

mgaionWalit avatar mgaionWalit commented on July 17, 2024

First thanks for you fast reply:

Can you reproduce on gpt.h2o.ai?
I am able to ask a question about a PDF, see sources, then click on the pdf link, and then it downloads that pdf as expected.
To view the pdf directly in the app you need to use the "Document Viewer" page.

i just tried on gpt.h2o.ai and i see a difference:
on h2ogpt i get the url like:
https://gpt.h2o.ai/file//ephemeral/gradio/....
on my installation i gthe url like:
https://localhost:7860/file/documents/foo.pdf

in the fact if i put a single / on h2ogpt i get the same error as in my localhost,
but if i put the double slash (//) on my localhost i get anyway the same error.

I will try to delete the DB and upload all the files again, maybe is something connected to this (i simply updated the code but i kept the same DB).

Did you reinstall all dependencies as in README_linux.md? Since back then, there's simple script to use.

yes, i readed the docs and i used the docs/linux_install.sh and updated (i think) everything.
Maybe i've done something uncorrect during the update, or maybe is the DB problem:
monday i will make a try starting from scratch and update this issue with news.

Thanks again and have a good weekend.

from h2ogpt.

pseudotensor avatar pseudotensor commented on July 17, 2024

If I run h2oGPT locally, I see links like:

http://0.0.0.0:7860/file//tmp/gradio/b852e91aec6aa0a62934ba33f2217f1a9b50169b/2402.01032.pdf

or

http://0.0.0.0:7860/file//tmp/gradio/ee06795f09742b34a9c12e51f42fdc699a4a196f/2015_Felix%201.pdf

chrome complains that those are insecure downloads and asks me to click to keep, else is fine.

If I go to localhost:7860 and use h2oGPT, I see:

http://localhost:7860/file//tmp/gradio/fc0da5441121b26fdafd06ea9c14b3d31a24b030/2401.03462%202.pdf

and still downloads.

from h2ogpt.

StefanDanielSchwarz avatar StefanDanielSchwarz commented on July 17, 2024

Having the same issue here: When clicking a file link on the Document Selection page, I get a JSON viewer with error message "File not allowed".

I'm using the current docker image gcr.io/vorvan/h2oai/h2ogpt-runtime@sha256:3234fe093a97fe625bd54c842222c65105cef71ef1ef6b4a4e88dab265f2e767.

from h2ogpt.

pseudotensor avatar pseudotensor commented on July 17, 2024

I only so far see this when the /tmp/gradio location is some kind of link and not a real physical directory. E.g. in linux, if /tmp/gradio is a soft link to /ephemeral/gradio then gradio won't allow /tmp/gradio access.

from h2ogpt.

mgaionWalit avatar mgaionWalit commented on July 17, 2024

Unluckly i wasnt able to understand the problem i got doing the code update.
I found this 2 solutions:
-start from scratch (i downloaded the repo, started the project and reconfigured all my documents and users)
-as mentioned before edit the code like this:
add the parameter "allowed_paths" on the gradio launcher like this:

demo.launch(share=kwargs['share'],
                allowed_paths=['<document_folder>'],

in the file:
src/gradio_runner.py

i'm sorry to not be able to help more but i got short time to investigate.

Thanks anyway for the support and replies

from h2ogpt.

pseudotensor avatar pseudotensor commented on July 17, 2024

I suspect it's something to do with firewall

Probably dev console would help in chrome, maybe shows errors there.

Probably basic gradio demo would have same issues.

from h2ogpt.

jarulsamy avatar jarulsamy commented on July 17, 2024

I am running into the same issue, adding the document folder to allowed_paths also fixes it for me. Perhaps adding the value of --user_path to allowed_paths automatically would solve this?

from h2ogpt.

pseudotensor avatar pseudotensor commented on July 17, 2024

I setup a user_path and used that, and I'm still able to access those files.

python generate.py --verbose=True --user_path=user_path

image

I wonder what is the issue. Put differently, why am I able to access my path and you can't? Maybe your path is an absolute path outside of the starting path? That is you guys have shown '<document_folder>' or documents but is this folder outside root of starting folder?

from h2ogpt.

pseudotensor avatar pseudotensor commented on July 17, 2024

Even an absolute path works for me:

image

from h2ogpt.

pseudotensor avatar pseudotensor commented on July 17, 2024

But yes clicking on source fails:

image

from h2ogpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.