Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,6 @@ from langchain.schema import SystemMessage as SM,HumanMessage as HM, AIMessage a
|
|
| 10 |
from langchain import hub
|
| 11 |
import os
|
| 12 |
import torch
|
| 13 |
-
|
| 14 |
import importlib.util
|
| 15 |
import logging
|
| 16 |
from typing import Any, Dict, Iterator, List, Mapping, Optional
|
|
@@ -44,6 +43,7 @@ logger = logging.getLogger(__name__)
|
|
| 44 |
|
| 45 |
|
| 46 |
class HuggingFacePipeline(BaseLLM):
|
|
|
|
| 47 |
"""HuggingFace Pipeline API.
|
| 48 |
|
| 49 |
To use, you should have the ``transformers`` python package installed.
|
|
|
|
| 10 |
from langchain import hub
|
| 11 |
import os
|
| 12 |
import torch
|
|
|
|
| 13 |
import importlib.util
|
| 14 |
import logging
|
| 15 |
from typing import Any, Dict, Iterator, List, Mapping, Optional
|
|
|
|
| 43 |
|
| 44 |
|
| 45 |
class HuggingFacePipeline(BaseLLM):
|
| 46 |
+
global torch
|
| 47 |
"""HuggingFace Pipeline API.
|
| 48 |
|
| 49 |
To use, you should have the ``transformers`` python package installed.
|