ehristoforu commited on
Commit
73fa276
·
verified ·
1 Parent(s): 840c22c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -22,7 +22,7 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
22
  HF_TOKEN = os.getenv("HF_TOKEN")
23
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
24
 
25
- model_name = "ehristoforu/cq3bitfp32"
26
 
27
  model = AutoModelForCausalLM.from_pretrained(
28
  model_name,
@@ -33,9 +33,9 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
33
  #peft_model = AutoPeftModelForCausalLM.from_pretrained("ehristoforu/CoolQwen2.5-3b-it")
34
  #merged_model = peft_model.merge_and_unload()
35
  #merged_model.save_pretrained("./coolqwen")
36
- model.save_pretrained("./coolqwen")
37
- tokenizer.save_pretrained("./coolqwen")
38
-
39
  from huggingface_hub import HfApi
40
 
41
  api = HfApi()
@@ -48,8 +48,9 @@ api.upload_folder(
48
  repo_type="model",
49
  token=HF_TOKEN,
50
  )
 
51
 
52
- @spaces.GPU(duration=240)
53
  def generate(
54
  message: str,
55
  chat_history: list[tuple[str, str]],
@@ -108,7 +109,7 @@ chat_interface = gr.ChatInterface(
108
  ),
109
  gr.Slider(
110
  label="Temperature",
111
- minimum=0.1,
112
  maximum=4.0,
113
  step=0.1,
114
  value=0.6,
 
22
  HF_TOKEN = os.getenv("HF_TOKEN")
23
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
24
 
25
+ model_name = "datalama/EXAONE-3.5-7.8B-Instruct-Llamafied"
26
 
27
  model = AutoModelForCausalLM.from_pretrained(
28
  model_name,
 
33
  #peft_model = AutoPeftModelForCausalLM.from_pretrained("ehristoforu/CoolQwen2.5-3b-it")
34
  #merged_model = peft_model.merge_and_unload()
35
  #merged_model.save_pretrained("./coolqwen")
36
+ #model.save_pretrained("./coolqwen")
37
+ #tokenizer.save_pretrained("./coolqwen")
38
+ '''
39
  from huggingface_hub import HfApi
40
 
41
  api = HfApi()
 
48
  repo_type="model",
49
  token=HF_TOKEN,
50
  )
51
+ '''
52
 
53
+ @spaces.GPU(duration=60)
54
  def generate(
55
  message: str,
56
  chat_history: list[tuple[str, str]],
 
109
  ),
110
  gr.Slider(
111
  label="Temperature",
112
+ minimum=0.0,
113
  maximum=4.0,
114
  step=0.1,
115
  value=0.6,