Victoria Oberascher commited on
Commit
5265a69
·
1 Parent(s): c6725e5

remove gradio interface

Browse files
Files changed (1) hide show
  1. app.py +30 -1
app.py CHANGED
@@ -2,4 +2,33 @@ import evaluate
2
  from evaluate.utils import launch_gradio_widget
3
 
4
  module = evaluate.load("SEA-AI/horizon-metrics")
5
- launch_gradio_widget(module)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  from evaluate.utils import launch_gradio_widget
3
 
4
  module = evaluate.load("SEA-AI/horizon-metrics")
5
+ #launch_gradio_widget(module)
6
+
7
+
8
+ def launch_empty_interface():
9
+ """Launches an empty Gradio interface."""
10
+
11
+ try:
12
+ import gradio as gr
13
+ except ImportError as error:
14
+ print(
15
+ "To create a metric widget with Gradio make sure gradio is installed."
16
+ )
17
+ raise error
18
+
19
+ def dummy_function():
20
+ return "This is an empty interface."
21
+
22
+ iface = gr.Interface(
23
+ fn=dummy_function,
24
+ inputs=[],
25
+ outputs=[],
26
+ description="This is a description of the empty interface.",
27
+ title="Empty Interface",
28
+ article="You can provide additional information or instructions here.")
29
+
30
+ iface.launch()
31
+
32
+
33
+ # Call the function to launch the interface
34
+ launch_empty_interface()