Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,8 @@ from langchain.prompts import HumanMessagePromptTemplate, ChatPromptTemplate
|
|
| 5 |
from langchain.output_parsers import PydanticOutputParser
|
| 6 |
from langchain_openai import ChatOpenAI
|
| 7 |
|
|
|
|
|
|
|
| 8 |
|
| 9 |
class TextTranslator(BaseModel):
|
| 10 |
output_text: str = Field(description="Python string containing the output text translated in the desired language")
|
|
|
|
| 5 |
from langchain.output_parsers import PydanticOutputParser
|
| 6 |
from langchain_openai import ChatOpenAI
|
| 7 |
|
| 8 |
+
# define the model instance
|
| 9 |
+
chat = ChatOpenAI()
|
| 10 |
|
| 11 |
class TextTranslator(BaseModel):
|
| 12 |
output_text: str = Field(description="Python string containing the output text translated in the desired language")
|