Spaces:
Sleeping
Sleeping
Adding title, desc
Browse files
app.py
CHANGED
@@ -4,7 +4,10 @@
|
|
4 |
import gradio as gr
|
5 |
from transformers import pipeline
|
6 |
|
7 |
-
model = pipeline("text-generation")
|
|
|
|
|
|
|
8 |
|
9 |
def predict(prompt):
|
10 |
completion = model(prompt)[0]["generated_text"]
|
|
|
4 |
import gradio as gr
|
5 |
from transformers import pipeline
|
6 |
|
7 |
+
model = pipeline("text-generation", model="openai-community/gpt2")
|
8 |
+
|
9 |
+
title = "openai-community/gpt2 prompt completion"
|
10 |
+
description = "Basic demo from the NLP course"
|
11 |
|
12 |
def predict(prompt):
|
13 |
completion = model(prompt)[0]["generated_text"]
|