Spaces:
Runtime error
Runtime error
first
Browse files
app.py
CHANGED
|
@@ -1,14 +1,15 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
# def load_css():
|
| 4 |
# with open('app.css', 'r') as file:
|
| 5 |
# return file.read()
|
| 6 |
|
| 7 |
-
def translate_fortran_to_rust(fortran_code):
|
| 8 |
"""Translate Fortran code to Rust using the provided model."""
|
| 9 |
# Translation logic, with example stubbed function call
|
| 10 |
-
|
| 11 |
-
return
|
| 12 |
|
| 13 |
default_codes = """
|
| 14 |
program sum_of_numbers\n
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import inference
|
| 3 |
|
| 4 |
# def load_css():
|
| 5 |
# with open('app.css', 'r') as file:
|
| 6 |
# return file.read()
|
| 7 |
|
| 8 |
+
def translate_fortran_to_rust(fortran_code, fortran_explain):
|
| 9 |
"""Translate Fortran code to Rust using the provided model."""
|
| 10 |
# Translation logic, with example stubbed function call
|
| 11 |
+
rust_code = inference.testing(fortran_code)
|
| 12 |
+
return rust_code
|
| 13 |
|
| 14 |
default_codes = """
|
| 15 |
program sum_of_numbers\n
|