Dawoodthouseef commited on
Commit
659332b
·
1 Parent(s): 813a71e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -25,11 +25,10 @@ def generate_response(input_text):
25
  conversation_history.append({"role": "assistant", "content": response_text})
26
 
27
  return response_text
28
- # Create a Gradio interface
29
- with gr.Blocks(analytics_enabled=False, css=css) as demo:
30
  with gr.Column():
31
  gr.Markdown(
32
- """ ## Mistral-7b Version-2.0
33
 
34
  Type in the box below and click the button to generate answers to your most pressing questions!
35
 
@@ -37,16 +36,21 @@ with gr.Blocks(analytics_enabled=False, css=css) as demo:
37
  )
38
 
39
  with gr.Row():
40
-
41
  with gr.Column(scale=3):
42
- instruction = gr.Textbox(placeholder="Enter your question here", label="Question", elem_id="q-input")
43
-
44
  with gr.Box():
45
  gr.Markdown("**Answer**")
46
  output = gr.Markdown(elem_id="q-output")
47
  submit = gr.Button("Generate", variant="primary")
 
 
 
 
 
 
 
 
48
 
49
-
50
 
51
  submit.click(generate_response, inputs=[instruction], outputs=[output])
52
  instruction.submit(generate_response, inputs=[instruction], outputs=[output])
 
25
  conversation_history.append({"role": "assistant", "content": response_text})
26
 
27
  return response_text
28
+ with gr.Blocks(theme=seafoam, analytics_enabled=False, css=css) as demo:
 
29
  with gr.Column():
30
  gr.Markdown(
31
+ """ ## Mistral-7b
32
 
33
  Type in the box below and click the button to generate answers to your most pressing questions!
34
 
 
36
  )
37
 
38
  with gr.Row():
 
39
  with gr.Column(scale=3):
40
+ instruction = gr.Textbox(placeholder="Type Your message here...", label="Question", elem_id="q-input")
 
41
  with gr.Box():
42
  gr.Markdown("**Answer**")
43
  output = gr.Markdown(elem_id="q-output")
44
  submit = gr.Button("Generate", variant="primary")
45
+ gr.Examples(
46
+ examples=examples,
47
+ inputs=[instruction],
48
+ cache_examples=True,
49
+ fn=process_example,
50
+ outputs=[output],
51
+ )
52
+
53
 
 
54
 
55
  submit.click(generate_response, inputs=[instruction], outputs=[output])
56
  instruction.submit(generate_response, inputs=[instruction], outputs=[output])