eswardivi commited on
Commit
8bb652f
1 Parent(s): 14c4923

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -30,6 +30,7 @@ terminators = [tok.eos_token_id, tok.convert_tokens_to_ids("<|eot_id|>")]
30
 
31
 
32
  def fetch_text(url):
 
33
  prefix_url = "https://r.jina.ai/"
34
  url = prefix_url + url
35
  response = httpx.get(url, timeout=60.0)
@@ -39,6 +40,8 @@ def fetch_text(url):
39
  @spaces.GPU
40
  def synthesize(article_url, progress=gr.Progress()):
41
  text = fetch_text(article_url)
 
 
42
  template = """
43
  {
44
  "conversation": [
@@ -66,7 +69,6 @@ def synthesize(article_url, progress=gr.Progress()):
66
  )
67
 
68
  speed = 1.0
69
- device = "cuda" if torch.cuda.is_available() else "cpu"
70
  models = {
71
  "EN": TTS(language="EN", device=device),
72
  }
 
30
 
31
 
32
  def fetch_text(url):
33
+ print("Entered Webpage Extraction")
34
  prefix_url = "https://r.jina.ai/"
35
  url = prefix_url + url
36
  response = httpx.get(url, timeout=60.0)
 
40
  @spaces.GPU
41
  def synthesize(article_url, progress=gr.Progress()):
42
  text = fetch_text(article_url)
43
+ device = "cuda" if torch.cuda.is_available() else "cpu"
44
+
45
  template = """
46
  {
47
  "conversation": [
 
69
  )
70
 
71
  speed = 1.0
 
72
  models = {
73
  "EN": TTS(language="EN", device=device),
74
  }