ML610 commited on
Commit
7d2c16c
·
1 Parent(s): 1cb5b17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -10,11 +10,20 @@ def generateResponse(prompt):
10
  response = model(prompt, max_new_tokens=1024, threads=8)
11
  return response
12
 
13
- with gr.Blocks() as UI:
14
- gr.Markdown("This space is an attempt to run the GGUF 4 bit quantized version of 'Mistral-7B-Instruct-V0.1'")
15
- prompt = gr.Textbox(label="User")
16
- output = gr.Textbox(label="Assistant")
17
- submitBtn = gr.Button("Submit")
18
- submitBtn.click(fn=generateResponse, inputs=prompt, outputs=output, api_name="generateResponse")
 
 
 
 
 
 
 
 
 
19
 
20
  UI.queue().launch()
 
10
  response = model(prompt, max_new_tokens=1024, threads=8)
11
  return response
12
 
13
+ examples = ['Write a poem', 'Tell me a joke', 'Write a marketing catch phrase for an AI app']
14
+
15
+ title = "Mistral-7B-Instruct-v0.1-GGUF"
16
+
17
+ description = "This space is an attempt to run the GGUF 4 bit quantized version of 'Mistral-7B-Instruct-v0.1'."
18
+
19
+ UI = gr.ChatInterface(
20
+ fn=generateResponse,
21
+ examples=examples,
22
+ title=title,
23
+ description=description,
24
+ submit_btn="Submit",
25
+ stop_btn="Stop generating",
26
+ clear_btn="Clear chat"
27
+ )
28
 
29
  UI.queue().launch()