lambda-workstation commited on
Commit
26cb9ad
Β·
1 Parent(s): b0f7d39

Python 3.11 version test

Browse files
Files changed (3) hide show
  1. README.md +8 -5
  2. app.py +40 -0
  3. requirements.txt +1 -0
README.md CHANGED
@@ -1,12 +1,15 @@
1
  ---
2
- title: Python311 Test
3
- emoji: 🌍
4
  colorFrom: blue
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 6.2.0
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
  ---
2
+ title: Python 3.11 Test
3
+ emoji: 🐍
4
  colorFrom: blue
5
+ colorTo: green
6
  sdk: gradio
7
+ sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
+ python_version: "3.11"
11
  ---
12
 
13
+ # Python 3.11 Test
14
+
15
+ Simple test to verify Python 3.11 works on HF Spaces.
app.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Simple Python version test
3
+ """
4
+ import gradio as gr
5
+ import sys
6
+ import platform
7
+
8
+ def get_python_info():
9
+ """Get Python version information"""
10
+ info = f"""
11
+ ## Python Environment Info
12
+
13
+ - **Python Version**: {sys.version}
14
+ - **Python Executable**: {sys.executable}
15
+ - **Platform**: {platform.platform()}
16
+ - **Machine**: {platform.machine()}
17
+ - **Processor**: {platform.processor()}
18
+
19
+ ### Python Version Check
20
+ - Major: {sys.version_info.major}
21
+ - Minor: {sys.version_info.minor}
22
+ - Micro: {sys.version_info.micro}
23
+
24
+ ### Is Python 3.11+?
25
+ {"βœ… YES - Python 3.11 or higher!" if sys.version_info >= (3, 11) else "❌ NO - Running Python " + str(sys.version_info.major) + "." + str(sys.version_info.minor)}
26
+ """
27
+ return info
28
+
29
+ # Create simple interface
30
+ demo = gr.Interface(
31
+ fn=get_python_info,
32
+ inputs=[],
33
+ outputs=gr.Markdown(label="Python Info"),
34
+ title="🐍 Python Version Test",
35
+ description="Click Submit to check Python version on this HF Space",
36
+ allow_flagging="never"
37
+ )
38
+
39
+ if __name__ == "__main__":
40
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ # No additional requirements - just testing Python version