Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
import subprocess
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
|
6 |
app = FastAPI()
|
|
|
1 |
from fastapi import FastAPI
|
2 |
import subprocess
|
3 |
+
import re
|
4 |
+
|
5 |
+
def find_imports(code):
|
6 |
+
pattern = r'Python\.import_module\("([^"]*)"\)'
|
7 |
+
matches = re.findall(pattern, code)
|
8 |
+
return matches
|
9 |
|
10 |
|
11 |
app = FastAPI()
|