Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,9 +75,13 @@ import os
|
|
| 75 |
#pipe=pipeline(model=m,tokenizer=t,task="text-generation")
|
| 76 |
import multiprocessing
|
| 77 |
|
| 78 |
-
from
|
| 79 |
|
| 80 |
-
llm =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
from langchain.retrievers import WikipediaRetriever as Wiki
|
| 82 |
import gradio as gr
|
| 83 |
chatbot = gr.Chatbot(
|
|
|
|
| 75 |
#pipe=pipeline(model=m,tokenizer=t,task="text-generation")
|
| 76 |
import multiprocessing
|
| 77 |
|
| 78 |
+
from langchain_huggingface.llms import HuggingFacePipeline
|
| 79 |
|
| 80 |
+
llm = HuggingFacePipeline.from_model_id(
|
| 81 |
+
model_id="peterpeter8585/zephyr",
|
| 82 |
+
task="text-generation",
|
| 83 |
+
pipeline_kwargs={"max_new_tokens": 10},
|
| 84 |
+
)
|
| 85 |
from langchain.retrievers import WikipediaRetriever as Wiki
|
| 86 |
import gradio as gr
|
| 87 |
chatbot = gr.Chatbot(
|