Spaces:
Runtime error
Runtime error
fix: missing libraries
Browse files
app.py
CHANGED
|
@@ -27,6 +27,40 @@ from huggingface_hub.utils import (
|
|
| 27 |
get_session,
|
| 28 |
hf_raise_for_status,
|
| 29 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
from gradio.themes import ThemeClass as Theme
|
| 32 |
|
|
|
|
| 27 |
get_session,
|
| 28 |
hf_raise_for_status,
|
| 29 |
)
|
| 30 |
+
from huggingface_hub.inference._common import (
|
| 31 |
+
TASKS_EXPECTING_IMAGES,
|
| 32 |
+
ContentT,
|
| 33 |
+
InferenceTimeoutError,
|
| 34 |
+
ModelStatus,
|
| 35 |
+
_b64_encode,
|
| 36 |
+
_b64_to_image,
|
| 37 |
+
_bytes_to_dict,
|
| 38 |
+
_bytes_to_image,
|
| 39 |
+
_bytes_to_list,
|
| 40 |
+
_get_recommended_model,
|
| 41 |
+
_import_numpy,
|
| 42 |
+
_is_tgi_server,
|
| 43 |
+
_open_as_binary,
|
| 44 |
+
_set_as_non_tgi,
|
| 45 |
+
_stream_text_generation_response,
|
| 46 |
+
)
|
| 47 |
+
from huggingface_hub.inference._text_generation import (
|
| 48 |
+
TextGenerationParameters,
|
| 49 |
+
TextGenerationRequest,
|
| 50 |
+
TextGenerationResponse,
|
| 51 |
+
TextGenerationStreamResponse,
|
| 52 |
+
raise_text_generation_error,
|
| 53 |
+
)
|
| 54 |
+
from huggingface_hub.inference._types import (
|
| 55 |
+
ClassificationOutput,
|
| 56 |
+
ConversationalOutput,
|
| 57 |
+
FillMaskOutput,
|
| 58 |
+
ImageSegmentationOutput,
|
| 59 |
+
ObjectDetectionOutput,
|
| 60 |
+
QuestionAnsweringOutput,
|
| 61 |
+
TableQuestionAnsweringOutput,
|
| 62 |
+
TokenClassificationOutput,
|
| 63 |
+
)
|
| 64 |
|
| 65 |
from gradio.themes import ThemeClass as Theme
|
| 66 |
|