zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks
https://privategpt.dev
Apache License 2.0
53.98k stars 7.25k forks source link

Cannot run the basic gradio API examples in the documentation #1230

Open swvajanyatek opened 11 months ago

swvajanyatek commented 11 months ago

I get an error when trying to run this, straight from the doco

from gradio_client import Client

client = Client("http://localhost:8001/")
result = client.predict(
        "Howdy!",   # str  in 'Message' Textbox component
        "Query Docs",   # str  in 'Mode' Radio component
        "https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf",    # str (filepath on your computer (or URL) of file) in 'Upload a File' Uploadbutton component
        api_name="/chat"
)
print(result)

[Errno 2] No such file or directory: 'https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf'
  File "/home/tpadgett/github-proforma/privateGPTManager/testQuestions.py", line 5, in <module>
    result = client.predict(
             ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf'```

What am I missing here?
FreshLucas-git commented 11 months ago

I also have the same problem.

github-actions[bot] commented 10 months ago

Stale issue