Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,11 @@ import gradio as gr
|
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
"""
|
5 |
-
|
|
|
|
|
6 |
"""
|
7 |
-
client = InferenceClient("
|
8 |
|
9 |
|
10 |
def respond(
|
@@ -41,12 +43,12 @@ def respond(
|
|
41 |
|
42 |
|
43 |
"""
|
44 |
-
|
45 |
"""
|
46 |
-
|
47 |
respond,
|
48 |
additional_inputs=[
|
49 |
-
gr.Textbox(value="You are a
|
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 |
-
|
|
|
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()
|