Spaces:
Sleeping
Sleeping
Expose app-local to the local network
Browse files- app-local.py +2 -2
- app.py +2 -2
app-local.py
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
# Run the app with no audio file restrictions
|
2 |
from app import createUi
|
3 |
-
createUi(-1)
|
|
|
1 |
+
# Run the app with no audio file restrictions, and make it available on the network
|
2 |
from app import createUi
|
3 |
+
createUi(-1, server_name="0.0.0.0")
|
app.py
CHANGED
@@ -129,7 +129,7 @@ def getSubs(segments: Iterator[dict], format: str) -> str:
|
|
129 |
return segmentStream.read()
|
130 |
|
131 |
|
132 |
-
def createUi(inputAudioMaxDuration, share=False):
|
133 |
ui = UI(inputAudioMaxDuration)
|
134 |
|
135 |
ui_description = "Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse "
|
@@ -152,7 +152,7 @@ def createUi(inputAudioMaxDuration, share=False):
|
|
152 |
gr.Text(label="Segments")
|
153 |
])
|
154 |
|
155 |
-
demo.launch(share=share)
|
156 |
|
157 |
if __name__ == '__main__':
|
158 |
createUi(DEFAULT_INPUT_AUDIO_MAX_DURATION)
|
|
|
129 |
return segmentStream.read()
|
130 |
|
131 |
|
132 |
+
def createUi(inputAudioMaxDuration, share=False, server_name: str = None):
|
133 |
ui = UI(inputAudioMaxDuration)
|
134 |
|
135 |
ui_description = "Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse "
|
|
|
152 |
gr.Text(label="Segments")
|
153 |
])
|
154 |
|
155 |
+
demo.launch(share=share, server_name=server_name)
|
156 |
|
157 |
if __name__ == '__main__':
|
158 |
createUi(DEFAULT_INPUT_AUDIO_MAX_DURATION)
|