sander-wood commited on
Commit
3198fcb
1 Parent(s): d2803de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,8 +3,11 @@ import torch
3
  import random
4
  from unidecode import unidecode
5
  import re
 
 
 
6
  from samplings import top_p_sampling, top_k_sampling, temperature_sampling
7
- from transformers import GPT2Model, GPT2LMHeadModel, PreTrainedModel
8
 
9
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10
  PATCH_LENGTH = 128 # Patch Length
@@ -368,8 +371,6 @@ def generate_abc(prompt,
368
 
369
  print("\n"+" OUTPUT TUNES ".center(60, "#"))
370
 
371
- start_time = time.time()
372
-
373
  for i in range(num_tunes):
374
  tune = "X:"+str(i+1) + "\n" + prompt
375
  lines = re.split(r'(\n)', tune)
 
3
  import random
4
  from unidecode import unidecode
5
  import re
6
+ import os
7
+ from tqdm import tqdm
8
+ import requests
9
  from samplings import top_p_sampling, top_k_sampling, temperature_sampling
10
+ from transformers import GPT2Config, GPT2Model, GPT2LMHeadModel, PreTrainedModel
11
 
12
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
  PATCH_LENGTH = 128 # Patch Length
 
371
 
372
  print("\n"+" OUTPUT TUNES ".center(60, "#"))
373
 
 
 
374
  for i in range(num_tunes):
375
  tune = "X:"+str(i+1) + "\n" + prompt
376
  lines = re.split(r'(\n)', tune)