Spaces:
Running
Running
Jesse Karmani
commited on
Use gradio
Browse files- 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)
|