Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from langchain.llms import HuggingFacePipeline
|
| 3 |
from langchain.llms import CTransformers
|
| 4 |
|
| 5 |
# Load model
|
| 6 |
llm = CTransformers(
|
| 7 |
-
model="
|
| 8 |
-
model_type="
|
| 9 |
config={"gpu_layers": 0} # Change to GPU layers if using paid plan
|
| 10 |
)
|
| 11 |
|
|
@@ -14,5 +13,5 @@ def chat(message):
|
|
| 14 |
return response
|
| 15 |
|
| 16 |
# Create UI
|
| 17 |
-
iface = gr.Interface(fn=chat, inputs="text", outputs="text", title="
|
| 18 |
-
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from langchain.llms import CTransformers
|
| 3 |
|
| 4 |
# Load model
|
| 5 |
llm = CTransformers(
|
| 6 |
+
model="TheBloke/OpenHermes-2.5-Mistral-7B-GGUF",
|
| 7 |
+
model_type="mistral",
|
| 8 |
config={"gpu_layers": 0} # Change to GPU layers if using paid plan
|
| 9 |
)
|
| 10 |
|
|
|
|
| 13 |
return response
|
| 14 |
|
| 15 |
# Create UI
|
| 16 |
+
iface = gr.Interface(fn=chat, inputs="text", outputs="text", title="OpenHermes Chatbot")
|
| 17 |
+
iface.launch()
|