Spaces:
Sleeping
Sleeping
import os | |
import gradio as gr | |
from embedchain import App | |
import os | |
#Initializing the Embedchain application with open source configuration | |
config = { | |
'llm': { | |
'provider': 'huggingface', | |
'config': { | |
'model': 'mistralai/Mistral-7B-Instruct-v0.2', | |
'top_p': 0.5 | |
} | |
}, | |
'embedder': { | |
'provider': 'huggingface', | |
'config': { | |
'model': 'sentence-transformers/all-mpnet-base-v2' | |
} | |
} | |
} | |
app = App.from_config(config=config) | |
# Add data to the app | |
app.add("https://voxiitk.com/scrapping-of-galaxy24/") | |
app.add("https://voxiitk.com/administration-responds-to-students-senates-demands/") | |
app.add("https://voxiitk.com/yeh-hall-ab-13-na-raha/") | |
app.add("https://voxiitk.com/girls-protest-at-directors-residence/") | |
app.add("https://www.iitk.ac.in/doaa/data/UG-Manual.pdf") | |
def query(message, history): | |
return app.query(message) | |
demo = gr.ChatInterface(query) | |
demo.launch() | |