Jesse Karmani commited on
Commit
9c6ba11
1 Parent(s): 64b847c

Use gradio

Browse files
Files changed (1) hide show
  1. translate.py → app.py +4 -0
translate.py → app.py RENAMED
@@ -2,6 +2,7 @@ import os
2
  import math
3
  import argparse
4
  import glob
 
5
 
6
  import torch
7
  from torch.utils.data import DataLoader
@@ -558,3 +559,6 @@ if __name__ == "__main__":
558
  prompt=args.prompt,
559
  trust_remote_code=args.trust_remote_code,
560
  )
 
 
 
 
2
  import math
3
  import argparse
4
  import glob
5
+ import gradio
6
 
7
  import torch
8
  from torch.utils.data import DataLoader
 
559
  prompt=args.prompt,
560
  trust_remote_code=args.trust_remote_code,
561
  )
562
+
563
+ demo = gradio.Interface(fn=main, inputs="textbox", outputs="textbox")
564
+ demo.launch(share=True)