Spaces:
Runtime error
Runtime error
ctankso_americas_corpdir_net
commited on
Commit
·
0a0682f
1
Parent(s):
966a2b3
minor re-formatting
Browse files
InnovationHub/llm/__pycache__/chain.cpython-310.pyc
CHANGED
Binary files a/InnovationHub/llm/__pycache__/chain.cpython-310.pyc and b/InnovationHub/llm/__pycache__/chain.cpython-310.pyc differ
|
|
InnovationHub/llm/__pycache__/vector_store.cpython-310.pyc
CHANGED
Binary files a/InnovationHub/llm/__pycache__/vector_store.cpython-310.pyc and b/InnovationHub/llm/__pycache__/vector_store.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -1,17 +1,5 @@
|
|
1 |
from InnovationHub.llm.vector_store import *
|
2 |
from InnovationHub.llm.chain import *
|
3 |
-
import os
|
4 |
-
import pprint
|
5 |
-
import codecs
|
6 |
-
import chardet
|
7 |
-
import gradio as gr
|
8 |
-
from langchain.llms import HuggingFacePipeline
|
9 |
-
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
10 |
-
from langchain.embeddings import HuggingFaceEmbeddings
|
11 |
-
from langchain.vectorstores import FAISS
|
12 |
-
from langchain import OpenAI, ConversationChain, LLMChain, PromptTemplate
|
13 |
-
from langchain.chains.conversation.memory import ConversationalBufferWindowMemory
|
14 |
-
from EdgeGPT import Chatbot
|
15 |
|
16 |
|
17 |
"""
|
@@ -23,9 +11,9 @@ index = FAISS(docs=docs, folder_path=db_path, embeddings=embeddings)
|
|
23 |
|
24 |
# Launch the Gradio UI
|
25 |
def start_gradio():
|
26 |
-
chatbot_interface =
|
27 |
fn=chatbot,
|
28 |
-
inputs=["text",
|
29 |
minimum=1, maximum=10, step=1, label="k")],
|
30 |
outputs="text",
|
31 |
title="Mercedes-Benz S-Class Owner's Manual",
|
|
|
1 |
from InnovationHub.llm.vector_store import *
|
2 |
from InnovationHub.llm.chain import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
|
5 |
"""
|
|
|
11 |
|
12 |
# Launch the Gradio UI
|
13 |
def start_gradio():
|
14 |
+
chatbot_interface = gradio.Interface(
|
15 |
fn=chatbot,
|
16 |
+
inputs=["text", gradio.inputs.Checkbox(label="Create bot"), gradio.inputs.Slider(
|
17 |
minimum=1, maximum=10, step=1, label="k")],
|
18 |
outputs="text",
|
19 |
title="Mercedes-Benz S-Class Owner's Manual",
|