WebGPT / app.py
Devis2awe's picture
Update app.py
160e0b1 verified
raw
history blame contribute delete
872 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
ollama_path="/usr/local/lib/python3.10/site-packages/ollama"
os.system(f"{ollama_path} ollama pull llama3")
# 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()