Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
import os
|
| 2 |
import torch
|
| 3 |
-
from transformers import AutoModelForCausalLM as m, AutoTokenizer as t
|
| 4 |
-
|
|
|
|
| 5 |
tok=t.from_pretrained("peterpeter8585/sungyoonaimodel2", trust_remote_code=True)
|
| 6 |
mod.eval()
|
| 7 |
import requests
|
|
@@ -131,6 +132,6 @@ ai1=gr.ChatInterface(
|
|
| 131 |
)
|
| 132 |
],
|
| 133 |
)
|
| 134 |
-
with gr.Blocks(theme="
|
| 135 |
gr.TabbedInterface([ai1],["Chatchat"])
|
| 136 |
ai.launch()
|
|
|
|
| 1 |
import os
|
| 2 |
import torch
|
| 3 |
+
from transformers import AutoModelForCausalLM as m, AutoTokenizer as t, GPTQConfig as quant
|
| 4 |
+
qq=quant(bits=4, exllama_config={"version":2})
|
| 5 |
+
mod=m.from_pretrained("peterpeter8585/sungyoonaimodel2", quantization_config=qq)
|
| 6 |
tok=t.from_pretrained("peterpeter8585/sungyoonaimodel2", trust_remote_code=True)
|
| 7 |
mod.eval()
|
| 8 |
import requests
|
|
|
|
| 132 |
)
|
| 133 |
],
|
| 134 |
)
|
| 135 |
+
with gr.Blocks(theme="shivi/calm_seafoam") as ai:
|
| 136 |
gr.TabbedInterface([ai1],["Chatchat"])
|
| 137 |
ai.launch()
|