Spaces:
Sleeping
Sleeping
Updatres
Browse files
app.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
import os
|
| 2 |
import replicate
|
|
|
|
| 3 |
import streamlit as st
|
|
|
|
| 4 |
from langchain.prompts import (
|
| 5 |
ChatPromptTemplate,
|
| 6 |
FewShotChatMessagePromptTemplate,
|
|
@@ -11,8 +13,8 @@ from langchain_core.pydantic_v1 import BaseModel, Field
|
|
| 11 |
from langchain_core.messages import SystemMessage
|
| 12 |
from langchain_openai import ChatOpenAI
|
| 13 |
|
| 14 |
-
os.environ["OPENAI_API_KEY"] =
|
| 15 |
-
os.environ["REPLICATE_API_TOKEN"] =
|
| 16 |
|
| 17 |
class SceneInfo(BaseModel):
|
| 18 |
query: str = Field(description="This refers to the definition of the person who requested guidance.")
|
|
|
|
| 1 |
import os
|
| 2 |
import replicate
|
| 3 |
+
import keyfile as kf
|
| 4 |
import streamlit as st
|
| 5 |
+
|
| 6 |
from langchain.prompts import (
|
| 7 |
ChatPromptTemplate,
|
| 8 |
FewShotChatMessagePromptTemplate,
|
|
|
|
| 13 |
from langchain_core.messages import SystemMessage
|
| 14 |
from langchain_openai import ChatOpenAI
|
| 15 |
|
| 16 |
+
os.environ["OPENAI_API_KEY"] = kf.OPENKEY
|
| 17 |
+
os.environ["REPLICATE_API_TOKEN"] = kf.REPLICATE
|
| 18 |
|
| 19 |
class SceneInfo(BaseModel):
|
| 20 |
query: str = Field(description="This refers to the definition of the person who requested guidance.")
|