Bladeren bron

fix: fix generate bug

shellmiao 2 jaren geleden
bovenliggende
commit
2bff57bc86
1 gewijzigde bestanden met toevoegingen van 3 en 6 verwijderingen
  1. 3 6
      GlobalModel_generated.py

+ 3 - 6
GlobalModel_generated.py

@@ -37,7 +37,7 @@ def main(
     lora_weights_path: str = "",
     lora_config_path: str= "", # provide only the file path, excluding the file name 'adapter_config.json'
     prompt_template: str = "",  # The prompt template to use, will default to alpaca.
-    server_name: str = "127.0.0.1",
+    server_name: str = "0.0.0.0",
     share_gradio: bool = False,
 ):
     # 从命令行参数或环境变量获取基础模型名称
@@ -213,16 +213,13 @@ def main(
             gr.components.Checkbox(label="Stream output"),
         ],
         outputs=[
-            gr.inputs.Textbox(
-                lines=5,
-                label="Output",
-            )
+            gr.components.Textbox(lines=5, label="Output")
         ],
         title="FederatedGPT-shepherd",
         description="Shepherd is a LLM that has been fine-tuned in a federated manner ",
     ).queue()
 
-    sherpherd_UI.launch(share=True)
+    sherpherd_UI.launch(server_name=server_name, share=share_gradio)