Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,11 @@ import gradio as gr
|
|
11 |
import torch
|
12 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
13 |
from duckduckgo_search import DDGS
|
|
|
|
|
|
|
|
|
|
|
14 |
# import spaces # Import spaces early to enable ZeroGPU support
|
15 |
|
16 |
# Optional: Disable GPU visibility if you wish to force CPU usage
|
|
|
11 |
import torch
|
12 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
13 |
from duckduckgo_search import DDGS
|
14 |
+
|
15 |
+
from transformers import modeling_utils
|
16 |
+
if not hasattr(modeling_utils, "ALL_PARALLEL_STYLES") or modeling_utils.ALL_PARALLEL_STYLES is None:
|
17 |
+
modeling_utils.ALL_PARALLEL_STYLES = ["tp", "none","colwise",'rowwise']
|
18 |
+
|
19 |
# import spaces # Import spaces early to enable ZeroGPU support
|
20 |
|
21 |
# Optional: Disable GPU visibility if you wish to force CPU usage
|