Comments (5)
Hi @BigMann123yt it looks like you might be using an older version of pydantic
-- can you please upgrade?
pip install --upgrade pydantic
from gradio.
k that error got fixed, but now theres a different error
Traceback (most recent call last): File "c:\Krishna Main\ISWK\Python Files\AI ChatBot\app.py", line 1, in <module> from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex, LLMPredictor, PromptHelper File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gpt_index\__init__.py", line 14, in <module> from gpt_index.embeddings.langchain import LangchainEmbedding File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gpt_index\embeddings\langchain.py", line 6, in <module> from langchain.embeddings.base import Embeddings as LCEmbeddings File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\__init__.py", line 6, in <module> from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\agents\__init__.py", line 2, in <module> from langchain.agents.agent import ( File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\agents\agent.py", line 15, in <module> from langchain.agents.tools import InvalidTool File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\agents\tools.py", line 8, in <module> from langchain.tools.base import ( File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\tools\__init__.py", line 3, in <module> from langchain.tools.base import BaseTool File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\tools\base.py", line 16, in <module> from pydantic.main import ModelMetaclass ImportError: cannot import name 'ModelMetaclass' from 'pydantic.main' (C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pydantic\main.py)
from gradio.
Hi @BigMann123yt ! You may need to update your langchain version. I can't repro this issue when importing langchain. Will close this as the issue does not seem related to gradio but I will open a PR to fallback to Any
if JsonValue
is not available in pydantic.
from gradio.
yo BigMann.. did you figure this out?
from gradio.
aah yes i did, thank you for the response anyways.
i downgraded a few of the imported modules and it worked properly without the error
from gradio.
Related Issues (20)
- How to use tool="sketch" in gradio 4.x? HOT 4
- Running `gradio cc dev --host x.x.x.x` on a remote machine does not work.
- Incorrect monitoring URL when using the root_path parameter
- Error when using js for event listeners HOT 1
- Audio component waveform slow rendering HOT 1
- [Gradio Client] cannot pass keyword arguments HOT 6
- ChatBot API documentation does not use keyword argument syntyax HOT 3
- 'use via API' page should (could?) use live values HOT 1
- `@gradio/client` iterator doesn't fully finish (i think)
- Cancelled generators do only get closed after gradio exits. HOT 3
- Use cookies to persist monitoring URL token
- Data event return empty data object in JS client HOT 1
- Redirect to the specified URL HOT 1
- nude girl
- Add 'enable_monitoring' to `gr.mount_gradio_app()`
- How to get uploaded image and if user draws a mask get it as a gray mask from ImageEditor HOT 2
- client <-> server function id mismatch when rendering within sub-blocks HOT 2
- Fails to send gr.Examples into gr.ImageEditor
- Cannot scroll the chatbot when an event listener where it is the output is called HOT 1
- No more "download the image" button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.