ffreemt commited on
Commit
a296f33
1 Parent(s): adb2c74
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -10,9 +10,7 @@ from urllib.parse import urlparse
10
  import gradio as gr
11
  import psutil
12
  from about_time import about_time
13
-
14
- # from ctransformers import AutoConfig, AutoModelForCausalLM
15
- from ctransformers import AutoModelForCausalLM
16
  from huggingface_hub import hf_hub_download, snapshot_download
17
  from loguru import logger
18
 
@@ -322,7 +320,7 @@ LLM = AutoModelForCausalLM.from_pretrained(
322
  # REPO_ID, # DESTINATION_FOLDER, # model_path_or_repo_id: str required
323
  # model_file=_,
324
  _,
325
- model_type="llama", # "starcoder", AutoConfig.from_pretrained(REPO_ID)
326
  threads=cpu_count,
327
  )
328
 
@@ -410,7 +408,7 @@ with gr.Blocks(
410
  chatbot = gr.Chatbot(height=500)
411
  buff = gr.Textbox(show_label=False, visible=False)
412
  with gr.Row():
413
- with gr.Column(scale=5):
414
  msg = gr.Textbox(
415
  label="Chat Message Box",
416
  placeholder="Ask me anything (press Enter or click Submit to send)",
@@ -439,7 +437,7 @@ with gr.Blocks(
439
  examples = gr.Examples(
440
  examples=examples,
441
  inputs=[msg],
442
- examples_per_page=40,
443
  )
444
 
445
  # with gr.Row():
 
10
  import gradio as gr
11
  import psutil
12
  from about_time import about_time
13
+ from ctransformers import AutoConfig, AutoModelForCausalLM
 
 
14
  from huggingface_hub import hf_hub_download, snapshot_download
15
  from loguru import logger
16
 
 
320
  # REPO_ID, # DESTINATION_FOLDER, # model_path_or_repo_id: str required
321
  # model_file=_,
322
  _,
323
+ # model_type=AutoConfig.from_pretrained(REPO_ID).model_type,
324
  threads=cpu_count,
325
  )
326
 
 
408
  chatbot = gr.Chatbot(height=500)
409
  buff = gr.Textbox(show_label=False, visible=False)
410
  with gr.Row():
411
+ with gr.Column(scale=4):
412
  msg = gr.Textbox(
413
  label="Chat Message Box",
414
  placeholder="Ask me anything (press Enter or click Submit to send)",
 
437
  examples = gr.Examples(
438
  examples=examples,
439
  inputs=[msg],
440
+ examples_per_page=20,
441
  )
442
 
443
  # with gr.Row():