Spaces:
Sleeping
Sleeping
Commit
·
d77f563
1
Parent(s):
3ffe848
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,8 @@ def generate_text(prompt):
|
|
| 32 |
interface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
|
| 33 |
|
| 34 |
# Esempio di utilizzo del modello
|
| 35 |
-
inputs = tokenizer("Esempio di testo da classificare", return_tensors="pt")
|
| 36 |
-
outputs = model(**inputs)
|
| 37 |
|
| 38 |
# Define a function to generate text using the model
|
| 39 |
#def generate_text(input_text):
|
|
@@ -41,6 +41,6 @@ outputs = model(**inputs)
|
|
| 41 |
# output = model.generate(input_ids)
|
| 42 |
# return tokenizer.decode(output[0], skip_special_tokens=True)
|
| 43 |
|
| 44 |
-
interface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
|
| 45 |
|
| 46 |
interface.launch()
|
|
|
|
| 32 |
interface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
|
| 33 |
|
| 34 |
# Esempio di utilizzo del modello
|
| 35 |
+
#inputs = tokenizer("Esempio di testo da classificare", return_tensors="pt")
|
| 36 |
+
#outputs = model(**inputs)
|
| 37 |
|
| 38 |
# Define a function to generate text using the model
|
| 39 |
#def generate_text(input_text):
|
|
|
|
| 41 |
# output = model.generate(input_ids)
|
| 42 |
# return tokenizer.decode(output[0], skip_special_tokens=True)
|
| 43 |
|
| 44 |
+
#interface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
|
| 45 |
|
| 46 |
interface.launch()
|