WebGPT / app.py
devis2's picture
Testing: Add ollama, langchain, and gradio dependencies
12cd3e7
raw
history blame
758 Bytes
import os
import gradio as gr
import ollama
import bs4
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_community.document_loaders import WebBaseLoader
from langchain_community.vectorstores import Chroma
from langchain_community.embeddings import OllamaEmbeddings
from langchain_core.output_parsers import StrOutputParser
from langchain_core.runnables import RunnablePassthrough
os.system("ollama pull llama3")
os.system("ollama pull nomic-embed-text")
def main( query , link ):
return "Hello World"
iface = gr.Interface(
fn=main,
inputs=
[
gr.Textbox(label="Input Query"),
gr.Textbox(label="Input Link"),
],
outputs=["textbox"]
)
if __name__ == "__main__":
iface.launch()