classicmaniagames commited on
Commit
3f3946f
1 Parent(s): bd08a9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -1,6 +1,16 @@
1
  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
  """
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
+
5
+ # Use a pipeline as a high-level helper
6
+ from transformers import pipeline
7
+
8
+ messages = [
9
+ {"role": "user", "content": "Who are you?"},
10
+ ]
11
+ pipe = pipeline("text-generation", model="ibm-granite/granite-8b-code-instruct")
12
+ pipe(messages)
13
+
14
  """
15
  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
16
  """