Narsil HF staff commited on
Commit
f4a2297
1 Parent(s): 6242de9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -109,7 +109,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False, seed
109
  data = query(payload)
110
 
111
  if raw_text:
112
- return None, data["generated_text"]
113
 
114
  width, height = 3246, 3246
115
  assets_path = "assets"
@@ -127,9 +127,9 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=False, seed
127
  BOX_COMP: "#120F25",
128
  }
129
 
130
- new_string = data["generated_text"].split(input_sentence, 1)[1]
131
 
132
- return data["generated_text"]
133
 
134
 
135
  gr.Interface(
 
109
  data = query(payload)
110
 
111
  if raw_text:
112
+ return None, data[0]["generated_text"]
113
 
114
  width, height = 3246, 3246
115
  assets_path = "assets"
 
127
  BOX_COMP: "#120F25",
128
  }
129
 
130
+ new_string = data[0]["generated_text"].split(input_sentence, 1)[1]
131
 
132
+ return data[0]["generated_text"]
133
 
134
 
135
  gr.Interface(