warhawkmonk commited on
Commit
166edc5
·
verified ·
1 Parent(s): 71b64d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load the TinyLlama model for text generation
5
- pipe = pipeline("text-generation", model="TinyLlama/TinyLlama_v1.1")
6
 
7
  # Define the prediction function
8
  def generate_text(prompt, max_length=128, temperature=1.0, top_p=0.95):
 
2
  from transformers import pipeline
3
 
4
  # Load the TinyLlama model for text generation
5
+ pipe = pipeline("text-generation", model="TinyLlama/TinyLlama_v1.1").to("cuda")
6
 
7
  # Define the prediction function
8
  def generate_text(prompt, max_length=128, temperature=1.0, top_p=0.95):