Compare commits
	
		
			3 Commits
		
	
	
		
			1ef27e7586
			...
			4caa0e0e0a
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 4caa0e0e0a | |
|  | 13fa055c56 | |
|  | 9cb1b02087 | 
|  | @ -3,3 +3,4 @@ Copies/* | |||
| names/* | ||||
| nameshf/* | ||||
| photo_2023-09-24_00-25-17.jpg | ||||
| __pycache__/FindinDB.cpython-38.pyc | ||||
|  |  | |||
							
								
								
									
										18
									
								
								FindinDB.py
								
								
								
								
							
							
						
						
									
										18
									
								
								FindinDB.py
								
								
								
								
							|  | @ -21,6 +21,7 @@ from langchain.embeddings import HuggingFaceEmbeddings | |||
| import pandas as pd | ||||
| import sqlite3 | ||||
| from sentence_transformers import SentenceTransformer | ||||
| from fastapi import FastAPI | ||||
| #from cleantext import clean | ||||
| import re | ||||
| model_name = 'hiiamsid/sentence_similarity_spanish_es' | ||||
|  | @ -32,6 +33,13 @@ hf = HuggingFaceEmbeddings( | |||
|     encode_kwargs=encode_kwargs | ||||
| ) | ||||
| 
 | ||||
| CUSTOM_PATH = "/angela" | ||||
| app = FastAPI() | ||||
| 
 | ||||
| @app.get("/") | ||||
| def read_main(): | ||||
|     return {"message": "This is your main app"} | ||||
| 
 | ||||
| 
 | ||||
| def loadModels(): | ||||
|     #model = GPT4All("orca-mini-3b.ggmlv3.q4_0.bin") | ||||
|  | @ -124,7 +132,13 @@ with gr.Blocks() as demo: | |||
|     # metrica3=gr.Textbox(label="metrica3") | ||||
|     Enviar_btn = gr.Button("Responder") | ||||
| 
 | ||||
|     Enviar_btn.click(fn=QARequest, inputs=[Pregunta,filtred], outputs=[Respuesta,id], api_name="Angela") #  | ||||
|     Enviar_btn.click(fn=QARequest, inputs=[Pregunta,filtred], outputs=[Respuesta,id], api_name="api_angela") #  | ||||
| 
 | ||||
| demo.launch() # | ||||
| #demo.launch(root_path="angela") # | ||||
| 
 | ||||
| gradio_app = gr.routes.App.create_app(demo) | ||||
| 
 | ||||
| app.mount(CUSTOM_PATH, gradio_app) | ||||
| 
 | ||||
| #app = demo.mount_gradio_app(app, io, path=CUSTOM_PATH) | ||||
| 
 | ||||
|  |  | |||
|  | @ -6,43 +6,68 @@ annotated-types==0.5.0 | |||
| anyio==3.7.1 | ||||
| async-timeout==4.0.3 | ||||
| attrs==23.1.0 | ||||
| beautifulsoup4==4.12.2 | ||||
| certifi==2023.7.22 | ||||
| chardet==5.2.0 | ||||
| charset-normalizer==3.2.0 | ||||
| clean-text==0.4.0 | ||||
| click==8.1.7 | ||||
| cmake==3.27.5 | ||||
| contourpy==1.1.1 | ||||
| cycler==0.11.0 | ||||
| dataclasses-json==0.6.0 | ||||
| emoji==2.8.0 | ||||
| exceptiongroup==1.1.3 | ||||
| faiss-cpu==1.7.4 | ||||
| fastapi==0.103.1 | ||||
| ffmpy==0.3.1 | ||||
| filelock==3.12.4 | ||||
| filetype==1.2.0 | ||||
| fonttools==4.42.1 | ||||
| frozenlist==1.4.0 | ||||
| fsspec==2023.9.1 | ||||
| ftfy==6.1.1 | ||||
| gpt4all==1.0.12 | ||||
| gradio==3.44.4 | ||||
| gradio_client==0.5.1 | ||||
| greenlet==2.0.2 | ||||
| h11==0.14.0 | ||||
| httpcore==0.18.0 | ||||
| httptools==0.6.0 | ||||
| httpx==0.25.0 | ||||
| huggingface-hub==0.17.2 | ||||
| idna==3.4 | ||||
| importlib-resources==6.1.0 | ||||
| Jinja2==3.1.2 | ||||
| joblib==1.3.2 | ||||
| jsonschema==4.19.1 | ||||
| jsonschema-specifications==2023.7.1 | ||||
| kiwisolver==1.4.5 | ||||
| langchain==0.0.297 | ||||
| langsmith==0.0.38 | ||||
| lit==16.0.6 | ||||
| lxml==4.9.3 | ||||
| MarkupSafe==2.1.3 | ||||
| marshmallow==3.20.1 | ||||
| matplotlib==3.7.3 | ||||
| mpmath==1.3.0 | ||||
| multidict==6.0.4 | ||||
| mypy-extensions==1.0.0 | ||||
| networkx==3.1 | ||||
| nltk==3.8.1 | ||||
| numexpr==2.8.6 | ||||
| numpy==1.24.4 | ||||
| nvidia-cublas-cu11==11.10.3.66 | ||||
| nvidia-cuda-cupti-cu11==11.7.101 | ||||
| nvidia-cuda-nvrtc-cu11==11.7.99 | ||||
| nvidia-cuda-runtime-cu11==11.7.99 | ||||
| nvidia-cudnn-cu11==8.5.0.96 | ||||
| nvidia-cufft-cu11==10.9.0.58 | ||||
| nvidia-curand-cu11==10.2.10.91 | ||||
| nvidia-cusolver-cu11==11.4.0.1 | ||||
| nvidia-cusparse-cu11==11.7.4.91 | ||||
| nvidia-nccl-cu11==2.14.3 | ||||
| nvidia-nvtx-cu11==11.7.91 | ||||
| orjson==3.9.7 | ||||
| packaging==23.1 | ||||
| pandas==2.0.3 | ||||
|  | @ -53,25 +78,48 @@ pydantic_core==2.6.3 | |||
| pydub==0.25.1 | ||||
| pyparsing==3.1.1 | ||||
| python-dateutil==2.8.2 | ||||
| python-dotenv==1.0.0 | ||||
| python-iso639==2023.6.15 | ||||
| python-magic==0.4.27 | ||||
| python-multipart==0.0.6 | ||||
| pytz==2023.3.post1 | ||||
| PyYAML==6.0.1 | ||||
| referencing==0.30.2 | ||||
| regex==2023.8.8 | ||||
| requests==2.31.0 | ||||
| rpds-py==0.10.3 | ||||
| safetensors==0.3.3 | ||||
| scikit-learn==1.3.0 | ||||
| scipy==1.10.1 | ||||
| semantic-version==2.10.0 | ||||
| sentence-transformers==2.2.2 | ||||
| sentencepiece==0.1.99 | ||||
| six==1.16.0 | ||||
| sniffio==1.3.0 | ||||
| soupsieve==2.5 | ||||
| SQLAlchemy==2.0.21 | ||||
| starlette==0.27.0 | ||||
| sympy==1.12 | ||||
| tabulate==0.9.0 | ||||
| tenacity==8.2.3 | ||||
| threadpoolctl==3.2.0 | ||||
| tokenizers==0.13.3 | ||||
| toolz==0.12.0 | ||||
| torch==2.0.1 | ||||
| torchvision==0.15.2 | ||||
| tqdm==4.66.1 | ||||
| transformers==4.33.2 | ||||
| triton==2.0.0 | ||||
| typing-inspect==0.9.0 | ||||
| typing_extensions==4.8.0 | ||||
| tzdata==2023.3 | ||||
| Unidecode==1.3.6 | ||||
| unstructured==0.10.16 | ||||
| urllib3==2.0.5 | ||||
| uvicorn==0.23.2 | ||||
| uvloop==0.17.0 | ||||
| watchfiles==0.20.0 | ||||
| wcwidth==0.2.6 | ||||
| websockets==11.0.3 | ||||
| yarl==1.9.2 | ||||
| zipp==3.17.0 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue