winglian commited on
Commit
80c7d2e
1 Parent(s): 54d2e53

fix layout, max size back to 1, llama.cpp doesn't like parallel calls

Browse files
Files changed (2) hide show
  1. config.yml +1 -1
  2. tabbed.py +11 -23
config.yml CHANGED
@@ -11,4 +11,4 @@ chat:
11
  - "### User:"
12
  queue:
13
  max_size: 16
14
- concurrency_count: 2
 
11
  - "### User:"
12
  queue:
13
  max_size: 16
14
+ concurrency_count: 1
tabbed.py CHANGED
@@ -70,26 +70,24 @@ def generate_text_instruct(input_text):
70
  return output['choices'][0]['text']
71
 
72
 
73
- instruct_description = f"""
74
- ### brought to you by OpenAccess AI Collective
75
- - This is the [{config["repo"]}](https://huggingface.co/{config["repo"]}) model file [{config["file"]}](https://huggingface.co/{config["repo"]}/blob/main/{config["file"]})
76
- - This Space uses GGML with GPU support, so it can quickly run larger models on smaller GPUs & VRAM.
77
- - This is running on a smaller, shared GPU, so it may take a few seconds to respond.
78
- - Due to a [missing feature in Gradio](https://github.com/gradio-app/gradio/issues/3914), the chatbot interface will not show you your status in the queue. If it's stuck, be patient.
79
- - [Duplicate the Space](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui?duplicate=true) to skip the queue and run in a private space or to use your own GGML models.
80
- - When using your own models, simply update the [config.yml](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui/blob/main/config.yml)
81
- - Contribute at [https://github.com/OpenAccess-AI-Collective/ggml-webui](https://github.com/OpenAccess-AI-Collective/ggml-webui)
82
- """
83
-
84
  instruct_interface = gr.Interface(
85
  fn=generate_text_instruct,
86
  inputs=gr.inputs.Textbox(lines= 10, label="Enter your input text"),
87
  outputs=gr.outputs.Textbox(label="Output text"),
88
- title="GGML UI Chatbot Demo",
89
- description=instruct_description,
90
  )
91
 
92
  with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
93
  with gr.Tab("Instruct"):
94
  gr.Markdown("# GGML Spaces Instruct Demo")
95
  instruct_interface.render()
@@ -108,16 +106,6 @@ with gr.Blocks() as demo:
108
  clear = gr.Button(value="New topic", variant="secondary").style(full_width=False)
109
  stop = gr.Button(value="Stop", variant="secondary").style(full_width=False)
110
  with gr.Row():
111
- with gr.Column():
112
- gr.Markdown(f"""
113
- ### brought to you by OpenAccess AI Collective
114
- - This is the [{config["repo"]}](https://huggingface.co/{config["repo"]}) model file [{config["file"]}](https://huggingface.co/{config["repo"]}/blob/main/{config["file"]})
115
- - This Space uses GGML with GPU support, so it can quickly run larger models on smaller GPUs & VRAM.
116
- - This is running on a smaller, shared GPU, so it may take a few seconds to respond.
117
- - [Duplicate the Space](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui?duplicate=true) to skip the queue and run in a private space or to use your own GGML models.
118
- - When using your own models, simply update the [config.yml](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui/blob/main/config.yml)
119
- - Contribute at [https://github.com/OpenAccess-AI-Collective/ggml-webui](https://github.com/OpenAccess-AI-Collective/ggml-webui)
120
- """)
121
  with gr.Column():
122
  max_tokens = gr.Slider(20, 1000, label="Max Tokens", step=20, value=300)
123
  temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=0.2)
 
70
  return output['choices'][0]['text']
71
 
72
 
 
 
 
 
 
 
 
 
 
 
 
73
  instruct_interface = gr.Interface(
74
  fn=generate_text_instruct,
75
  inputs=gr.inputs.Textbox(lines= 10, label="Enter your input text"),
76
  outputs=gr.outputs.Textbox(label="Output text"),
 
 
77
  )
78
 
79
  with gr.Blocks() as demo:
80
+ with gr.Row():
81
+ with gr.Column():
82
+ gr.Markdown(f"""
83
+ ### brought to you by OpenAccess AI Collective
84
+ - This is the [{config["repo"]}](https://huggingface.co/{config["repo"]}) model file [{config["file"]}](https://huggingface.co/{config["repo"]}/blob/main/{config["file"]})
85
+ - This Space uses GGML with GPU support, so it can quickly run larger models on smaller GPUs & VRAM.
86
+ - This is running on a smaller, shared GPU, so it may take a few seconds to respond.
87
+ - [Duplicate the Space](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui?duplicate=true) to skip the queue and run in a private space or to use your own GGML models.
88
+ - When using your own models, simply update the [config.yml](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui/blob/main/config.yml)
89
+ - Contribute at [https://github.com/OpenAccess-AI-Collective/ggml-webui](https://github.com/OpenAccess-AI-Collective/ggml-webui)
90
+ """)
91
  with gr.Tab("Instruct"):
92
  gr.Markdown("# GGML Spaces Instruct Demo")
93
  instruct_interface.render()
 
106
  clear = gr.Button(value="New topic", variant="secondary").style(full_width=False)
107
  stop = gr.Button(value="Stop", variant="secondary").style(full_width=False)
108
  with gr.Row():
 
 
 
 
 
 
 
 
 
 
109
  with gr.Column():
110
  max_tokens = gr.Slider(20, 1000, label="Max Tokens", step=20, value=300)
111
  temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=0.2)