Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,14 @@
|
|
1 |
import os
|
2 |
-
os.system('pip install gradio==4.42.0 curl_cffi tqdm bitsandbytes tiktoken g4f pinecone-client pandas datasets sentence-transformers')
|
3 |
|
4 |
PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
|
5 |
PINECONE_ENVIRONMENT = os.getenv("PINECONE_ENVIRONMENT")
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
# Setup and load your keys
|
8 |
import os
|
9 |
from g4f import ChatCompletion
|
|
|
1 |
import os
|
2 |
+
os.system('pip install gradio==4.42.0 curl_cffi tqdm bitsandbytes tiktoken g4f pinecone-client pandas datasets sentence-transformers pydantic')
|
3 |
|
4 |
PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
|
5 |
PINECONE_ENVIRONMENT = os.getenv("PINECONE_ENVIRONMENT")
|
6 |
|
7 |
+
from pydantic import BaseModel, ConfigDict
|
8 |
+
|
9 |
+
class MyModel(BaseModel):
|
10 |
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
11 |
+
|
12 |
# Setup and load your keys
|
13 |
import os
|
14 |
from g4f import ChatCompletion
|