Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,11 +15,9 @@ prompt=''' Review the Following text as a human, who is tasked to Extract `Code
|
|
| 15 |
def reply(message, history):
|
| 16 |
m=message.replace('\n','')
|
| 17 |
m=m.replace('\t','')
|
| 18 |
-
print(m)
|
| 19 |
inputs = tokenizer(prompt.format(m), return_tensors="pt")
|
| 20 |
outputs = model.generate(**inputs)
|
| 21 |
code=tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
| 22 |
-
print(code)
|
| 23 |
return code
|
| 24 |
|
| 25 |
demo = gr.ChatInterface(reply)
|
|
|
|
| 15 |
def reply(message, history):
|
| 16 |
m=message.replace('\n','')
|
| 17 |
m=m.replace('\t','')
|
|
|
|
| 18 |
inputs = tokenizer(prompt.format(m), return_tensors="pt")
|
| 19 |
outputs = model.generate(**inputs)
|
| 20 |
code=tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
|
|
|
| 21 |
return code
|
| 22 |
|
| 23 |
demo = gr.ChatInterface(reply)
|