Spaces:
Runtime error
Runtime error
Commit
·
f8f8bf3
1
Parent(s):
9184ef0
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
from typing import List, Tuple, Dict, Generator
|
2 |
from langchain.llms import OpenAI
|
3 |
import gradio as gr
|
4 |
-
|
|
|
5 |
model_name = "gpt-3.5-turbo"
|
6 |
-
OpenAI.api_key = "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"
|
7 |
LLM = OpenAI(model_name=model_name, temperature=0.1)
|
8 |
|
9 |
def create_history_messages(history: List[Tuple[str, str]]) -> List[dict]:
|
|
|
1 |
from typing import List, Tuple, Dict, Generator
|
2 |
from langchain.llms import OpenAI
|
3 |
import gradio as gr
|
4 |
+
import os
|
5 |
+
os.environ["OPENAI_API_KEY"] = "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"
|
6 |
model_name = "gpt-3.5-turbo"
|
7 |
+
#OpenAI.api_key = "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"
|
8 |
LLM = OpenAI(model_name=model_name, temperature=0.1)
|
9 |
|
10 |
def create_history_messages(history: List[Tuple[str, str]]) -> List[dict]:
|