File size: 872 Bytes
12cd3e7 005c7f8 12cd3e7 160e0b1 13ae865 5b05679 d132e48 12cd3e7 005c7f8 12cd3e7 005c7f8 12cd3e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
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() |