Spaces:
Sleeping
Sleeping
yinuozhang
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
import sys
|
3 |
from transformers import AutoTokenizer, AutoModel, AutoConfig
|
4 |
-
|
|
|
5 |
sys.path.insert(0, metalatte_path)
|
6 |
-
|
|
|
|
|
|
|
7 |
AutoConfig.register("metalatte", MetaLATTEConfig)
|
8 |
AutoModel.register(MetaLATTEConfig, MetaLATTEModel)
|
9 |
|
|
|
1 |
import gradio as gr
|
2 |
import sys
|
3 |
from transformers import AutoTokenizer, AutoModel, AutoConfig
|
4 |
+
# Add the current directory to the system path
|
5 |
+
metalatte_path = '.'
|
6 |
sys.path.insert(0, metalatte_path)
|
7 |
+
|
8 |
+
# Import the custom configuration and model
|
9 |
+
from configuration import MetaLATTEConfig
|
10 |
+
from model import MetaLATTEModel
|
11 |
AutoConfig.register("metalatte", MetaLATTEConfig)
|
12 |
AutoModel.register(MetaLATTEConfig, MetaLATTEModel)
|
13 |
|