Spaces:
Sleeping
Sleeping
ALNIK Al chatboard
Browse filesALNIK Al

Ok
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from huggingface_hub import InferenceClient
|
| 3 |
+
|
| 4 |
+
client = InferenceClient("meta-llama/Llama-3.2-1B")
|
| 5 |
+
|
| 6 |
+
def chat(message, history):
|
| 7 |
+
response = client.text_generation(message, max_new_tokens=200)
|
| 8 |
+
return response
|
| 9 |
+
|
| 10 |
+
demo = gr.ChatInterface(fn=chat, title="ALNIK AI")
|
| 11 |
+
demo.launch()
|