Эх сурвалжийг харах

Add option to share Gradio demo publicly (#189)

* Add option to share Gradio demo publicly

* gradio_share -> share_gradio

---------

Co-authored-by: Eric Wang <[email protected]>
Jiaxin Shan 3 жил өмнө
parent
commit
4a3c7e2231
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      generate.py

+ 2 - 1
generate.py

@@ -23,6 +23,7 @@ def main(
     load_8bit: bool = False,
     base_model: str = "",
     lora_weights: str = "tloen/alpaca-lora-7b",
+    share_gradio: bool = False,
 ):
     assert (
         base_model
@@ -140,7 +141,7 @@ def main(
         ],
         title="🦙🌲 Alpaca-LoRA",
         description="Alpaca-LoRA is a 7B-parameter LLaMA model finetuned to follow instructions. It is trained on the [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca) dataset and makes use of the Huggingface LLaMA implementation. For more information, please visit [the project's website](https://github.com/tloen/alpaca-lora).",  # noqa: E501
-    ).launch()
+    ).launch(share=share_gradio)
     # Old testing code follows.
 
     """