Spaces:
Build error
Build error
update
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ index.add(embeddings)
|
|
| 40 |
|
| 41 |
model_name = "TheBloke/zephyr-7B-beta-GPTQ"
|
| 42 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
| 43 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="
|
| 44 |
|
| 45 |
|
| 46 |
# Step 4: Define the Retrieval Function
|
|
@@ -67,7 +67,7 @@ def gradio_interface(query):
|
|
| 67 |
|
| 68 |
iface = gr.Interface(
|
| 69 |
fn=gradio_interface,
|
| 70 |
-
inputs=gr.
|
| 71 |
outputs="text",
|
| 72 |
title="RAG-based Course Search",
|
| 73 |
description="Enter a query to search for relevant courses using Retrieval Augmented Generation."
|
|
|
|
| 40 |
|
| 41 |
model_name = "TheBloke/zephyr-7B-beta-GPTQ"
|
| 42 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
| 43 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="cpu", trust_remote_code=False, use_exllama=False))
|
| 44 |
|
| 45 |
|
| 46 |
# Step 4: Define the Retrieval Function
|
|
|
|
| 67 |
|
| 68 |
iface = gr.Interface(
|
| 69 |
fn=gradio_interface,
|
| 70 |
+
inputs=gr.Textbox(lines=2, placeholder="Enter your query here..."),
|
| 71 |
outputs="text",
|
| 72 |
title="RAG-based Course Search",
|
| 73 |
description="Enter a query to search for relevant courses using Retrieval Augmented Generation."
|