cl2400 commited on
Commit
3f325cd
·
1 Parent(s): f83764d

initialize

Browse files
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. app.py +33 -0
  3. requirements.txt +2 -0
.DS_Store ADDED
Binary file (6.15 kB). View file
 
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ try:
5
+ hf_token = os.getenv("HF_TOKEN")
6
+ if hf_token:
7
+ demo = gr.Interface.load(
8
+ "huggingface/cl2400/LLM-Agent-Beer-Game-Simulator",
9
+ hf_token=hf_token
10
+ )
11
+ else:
12
+ demo = gr.Interface.load("huggingface/cl2400/LLM-Agent-Beer-Game-Simulator")
13
+
14
+ # demo.title = "Beer Game Simulation"
15
+ # demo.description = "Interactive beer game simulation for supply chain management learning."
16
+
17
+ except Exception as e:
18
+ # Error handling if the private space cannot be loaded
19
+ def error_interface():
20
+ return "Error: Unable to load the beer game simulation. Please check the configuration."
21
+
22
+ demo = gr.Interface(
23
+ fn=error_interface,
24
+ inputs=[],
25
+ outputs=gr.Textbox(label="Status"),
26
+ title="Beer Game Simulation - Error",
27
+ description="There was an issue loading the simulation. Please contact the administrator."
28
+ )
29
+
30
+ # Launch the interface
31
+ if __name__ == "__main__":
32
+ demo.launch()
33
+
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio
2
+