Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,8 @@ import numpy as np
|
|
| 8 |
import matplotlib.pyplot as plt
|
| 9 |
from matplotlib.colors import to_hex
|
| 10 |
from bs4 import BeautifulSoup
|
|
|
|
|
|
|
| 11 |
|
| 12 |
def clean_html(html_content):
|
| 13 |
# Parse the HTML
|
|
@@ -286,6 +288,7 @@ def gen_json(input_text, max_new_tokens):
|
|
| 286 |
return
|
| 287 |
|
| 288 |
# Creating the Gradio Interface
|
|
|
|
| 289 |
def generate_text(input_text, messages=None):
|
| 290 |
if input_text == "":
|
| 291 |
yield "Please enter some text first."
|
|
|
|
| 8 |
import matplotlib.pyplot as plt
|
| 9 |
from matplotlib.colors import to_hex
|
| 10 |
from bs4 import BeautifulSoup
|
| 11 |
+
from spaces import GPU
|
| 12 |
+
|
| 13 |
|
| 14 |
def clean_html(html_content):
|
| 15 |
# Parse the HTML
|
|
|
|
| 288 |
return
|
| 289 |
|
| 290 |
# Creating the Gradio Interface
|
| 291 |
+
@GPU
|
| 292 |
def generate_text(input_text, messages=None):
|
| 293 |
if input_text == "":
|
| 294 |
yield "Please enter some text first."
|