Update app.py
Browse files
app.py
CHANGED
@@ -1,28 +1,30 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
-
|
4 |
|
5 |
-
#
|
6 |
-
|
|
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
17 |
|
18 |
-
# Create Gradio interface
|
19 |
iface = gr.Interface(
|
20 |
-
fn=
|
21 |
-
inputs=
|
22 |
-
outputs=
|
23 |
-
title="Moshi
|
24 |
-
description="
|
25 |
)
|
26 |
|
27 |
-
# Launch the app
|
28 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
+
import moshi
|
4 |
|
5 |
+
# Print out the contents of the moshi module
|
6 |
+
print("Contents of moshi module:")
|
7 |
+
print(dir(moshi))
|
8 |
|
9 |
+
# Try to access some common attributes or functions
|
10 |
+
print("\nTrying to access common attributes or functions:")
|
11 |
+
for item in ['load_model', 'transcribe', 'MoshiServer', 'Moshi', 'MoshiConfig']:
|
12 |
+
try:
|
13 |
+
attr = getattr(moshi, item)
|
14 |
+
print(f"{item}: {attr}")
|
15 |
+
except AttributeError:
|
16 |
+
print(f"{item} not found in moshi module")
|
17 |
+
|
18 |
+
# Create a simple Gradio interface
|
19 |
+
def dummy_function(input_text):
|
20 |
+
return f"Moshi package version: {moshi.__version__}"
|
21 |
|
|
|
22 |
iface = gr.Interface(
|
23 |
+
fn=dummy_function,
|
24 |
+
inputs="text",
|
25 |
+
outputs="text",
|
26 |
+
title="Moshi Package Information",
|
27 |
+
description="This app displays information about the installed moshi package."
|
28 |
)
|
29 |
|
|
|
30 |
iface.launch()
|