Spaces:
Runtime error
Runtime error
Commit
·
bf72e89
1
Parent(s):
473ecbe
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from gpt_index import GPTSimpleVectorIndex
|
|
|
3 |
|
4 |
index = GPTSimpleVectorIndex.load_from_disk('./index (4).json')
|
|
|
5 |
|
6 |
def my_model_function(input_text):
|
7 |
response = index.query(input_text, response_mode="compact")
|
|
|
1 |
import gradio as gr
|
2 |
from gpt_index import GPTSimpleVectorIndex
|
3 |
+
from gpt_index.langchain_helpers.chain_wrapper import OpenAI
|
4 |
|
5 |
index = GPTSimpleVectorIndex.load_from_disk('./index (4).json')
|
6 |
+
openai = OpenAI(openai_api_key='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', temperature=0, model_name="text-davinci-003")
|
7 |
|
8 |
def my_model_function(input_text):
|
9 |
response = index.query(input_text, response_mode="compact")
|