Falln87 commited on
Commit
05c0e5b
1 Parent(s): fbc9a05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -2,9 +2,11 @@ import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
  """
5
- For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
 
 
6
  """
7
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
8
 
9
 
10
  def respond(
@@ -41,12 +43,12 @@ def respond(
41
 
42
 
43
  """
44
- For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
45
  """
46
- demo = gr.ChatInterface(
47
  respond,
48
  additional_inputs=[
49
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
50
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
51
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
52
  gr.Slider(
@@ -61,4 +63,4 @@ demo = gr.ChatInterface(
61
 
62
 
63
  if __name__ == "__main__":
64
- demo.launch()
 
2
  from huggingface_hub import InferenceClient
3
 
4
  """
5
+ # Load model directly
6
+ from transformers import AutoModel
7
+ model = AutoModel.from_pretrained("ebowwa/cognitive-hacker-gguf")
8
  """
9
+ client = InferenceClient("ebowwa/cognitive-hacker-gguf")
10
 
11
 
12
  def respond(
 
43
 
44
 
45
  """
46
+ Basic Gradio chatbot UI
47
  """
48
+ poop = gr.ChatInterface(
49
  respond,
50
  additional_inputs=[
51
+ gr.Textbox(value="You are a cognitive hacker.", label="System message"),
52
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
53
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
54
  gr.Slider(
 
63
 
64
 
65
  if __name__ == "__main__":
66
+ poop.launch()